> ## Documentation Index
> Fetch the complete documentation index at: https://docs.platform.decart.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Build with Decart's realtime AI video models. Transform live streams, generate videos, edit images, and animate avatars through a simple API.

Decart provides state-of-the-art AI models for transforming videos and images — both in realtime and as batch jobs — through a simple API.

<Note>
  **New: Lucy 2.1 Realtime** — Transform yourself into any character live on camera. Upload a reference image and see your movements mapped onto that character. [Learn more →](/models/realtime/lucy-2.1)
</Note>

## Get started in 3 steps

<Steps>
  <Step title="Get your API key">
    Sign up at [platform.decart.ai](https://platform.decart.ai) — you get free credits to start.
  </Step>

  <Step title="Install the SDK">
    ```bash theme={null}
    npm install @decartai/sdk
    ```

    Also available for [Python](/sdks/python), [Swift](/sdks/swift), and [Android](/sdks/android).
  </Step>

  <Step title="Run the example below">
    Copy the code, plug in your key, and you'll see transformed video in seconds.
  </Step>
</Steps>

## Try it: realtime character transform

This is the fastest way to see Decart in action. Open your camera, upload a face, and watch yourself become that character live:

```typescript theme={null}
import { createDecartClient, models } from "@decartai/sdk";

const model = models.realtime("lucy-latest");
const stream = await navigator.mediaDevices.getUserMedia({
  video: { frameRate: model.fps, width: model.width, height: model.height },
}).catch((err) => { console.error("Camera access failed:", err.message); throw err; });

const client = createDecartClient({ apiKey: "your-api-key-here" });

const realtimeClient = await client.realtime.connect(stream, {
  model,
  onRemoteStream: (remoteStream) => {
    document.getElementById("output").srcObject = remoteStream;
  },
  onError: (err) => console.error("Connection error:", err),
  onDisconnect: (reason) => console.log("Disconnected:", reason),
  initialState: {
    prompt: {
      text: "Substitute the character in the video with the person in the reference image.",
      enhance: true,
    },
    image: referencePhoto, // File, Blob, or URL
  },
});
```

<Tip>
  See the [Quickstart](/getting-started/quickstart) for full error handling, camera permission flows, and reconnection patterns.
</Tip>

## What you can build

<CardGroup cols={3}>
  <Card title="Realtime Character Transform" icon="masks-theater" href="/models/realtime/lucy-2.1">
    Become any character on camera with Lucy 2.1 — upload a face, see yourself transformed live
  </Card>

  <Card title="Realtime Style Transfer" icon="bolt" href="/models/realtime/video-restyling">
    Turn any live video stream into anime, cyberpunk, oil paintings, and more via WebRTC
  </Card>

  <Card title="Video Processing" icon="video" href="/models/video/overview">
    Edit videos with AI
  </Card>

  <Card title="Image Editing" icon="image" href="/models/image/image-editing">
    Transform and edit images with text prompts
  </Card>

  <Card title="Realtime Video Editing" icon="wand-magic-sparkles" href="/models/realtime/video-editing">
    Add, remove, or modify objects in live video with text prompts
  </Card>
</CardGroup>

## More examples

<Tabs>
  <Tab title="Realtime Style Transfer">
    Apply artistic styles to a live camera stream:

    ```typescript theme={null}
    import { createDecartClient, models } from "@decartai/sdk";

    const model = models.realtime("lucy-restyle-2");
    const stream = await navigator.mediaDevices.getUserMedia({
      video: { frameRate: model.fps, width: model.width, height: model.height },
    }).catch((err) => {
      console.error("Camera access failed:", err.message);
      throw err;
    });

    const client = createDecartClient({ apiKey: "your-api-key-here" });

    const realtimeClient = await client.realtime.connect(stream, {
      model,
      onRemoteStream: (s) => {
        document.getElementById("output").srcObject = s;
      },
      onError: (err) => console.error("Connection error:", err),
      onDisconnect: (reason) => console.log("Disconnected:", reason),
      initialState: {
        prompt: { text: "Studio Ghibli animation", enhance: true },
      },
    });

    // Switch styles on the fly
    realtimeClient.setPrompt("Cyberpunk city with neon lights");
    ```
  </Tab>

  <Tab title="Video Editing">
    Transform a video file with a single API call:

    ```typescript theme={null}
    import { createDecartClient, models } from "@decartai/sdk";
    import { readFileSync, writeFileSync } from "fs";

    const client = createDecartClient({ apiKey: process.env.DECART_API_KEY });
    const source = new Blob([readFileSync("input.mp4")], { type: "video/mp4" });

    const result = await client.queue.submitAndPoll({
      model: models.video("lucy-latest"),
      data: source,
      prompt: "Transform into anime style",
      onStatusChange: (job) => console.log(job.status),
    });

    if (result.status === "completed") {
      const buffer = Buffer.from(await result.data.arrayBuffer());
      writeFileSync("output.mp4", buffer);
    }
    ```
  </Tab>

  <Tab title="Image Editing">
    Edit an image synchronously:

    ```typescript theme={null}
    import { createDecartClient, models } from "@decartai/sdk";
    import { readFileSync } from "fs";

    const client = createDecartClient({ apiKey: process.env.DECART_API_KEY });

    const imageBuffer = readFileSync("input.jpg");
    const imageBlob = new Blob([imageBuffer], { type: "image/jpeg" });

    const result = await client.process({
      model: models.image("lucy-image-2"),
      prompt: "Transform into a watercolor painting style",
      data: imageBlob,
      resolution: "720p",
    });

    document.querySelector("img").src = URL.createObjectURL(result);
    ```
  </Tab>
</Tabs>

[View full quickstart →](/getting-started/quickstart)

## Which API should I use?

Most users start with the **Realtime API** above. If you need batch processing or image editing, here's how the three APIs compare:

| You want to...                                    | API              | SDK method                     |
| ------------------------------------------------- | ---------------- | ------------------------------ |
| Transform live camera/video in an interactive app | **Realtime API** | `client.realtime.connect()`    |
| Generate or edit videos asynchronously            | **Queue API**    | `client.queue.submitAndPoll()` |
| Edit images synchronously                         | **Process API**  | `client.process()`             |

## Explore

<CardGroup cols={2}>
  <Card title="Lucy 2.1 Realtime" href="/models/realtime/lucy-2.1" icon="masks-theater">
    Our flagship realtime model — character transformation at 720p
  </Card>

  <Card title="All Models" href="/getting-started/models" icon="layer-group">
    Compare all Decart models side by side
  </Card>

  <Card title="Quickstart" href="/getting-started/quickstart" icon="rocket">
    Transform your first video in minutes
  </Card>

  <Card title="API Reference" href="/api-reference/lucy-21" icon="code">
    Complete API documentation
  </Card>

  <Card title="SDKs" href="/sdks/javascript" icon="js">
    JavaScript, Python, Swift, and Android libraries
  </Card>

  <Card title="Examples" href="/examples/overview" icon="code">
    Realtime-first starter examples and repo links
  </Card>

  <Card title="Pricing" href="/getting-started/pricing" icon="credit-card">
    Simple pay-as-you-go pricing
  </Card>
</CardGroup>
