> ## 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.

# Models

> Explore Decart's AI models for video and image transformation

Decart offers state-of-the-art AI models for realtime and batch video transformation, lip synchronization, and image editing. Our models are optimized for creative applications, delivering professional-quality results with minimal latency.

<Note>
  **Lucy 2.1 supports both character reference images and text-only editing in one model.** [Get started →](/models/realtime/lucy-2.1)
</Note>

## Realtime models

Realtime models process live video and audio with low latency. They run continuously as long as the connection is open.

| Model              | ID               | Resolution | Use Case               |
| ------------------ | ---------------- | ---------- | ---------------------- |
| **Lucy 2.1**       | `lucy-2.1`       | 720p       | Video editing (latest) |
| **Lucy 2.1 VTON**  | `lucy-2.1-vton`  | 720p       | Virtual try-on         |
| **Lucy Restyle 2** | `lucy-restyle-2` | 720p       | Video restyling        |

## Video models

Video models process pre-recorded video asynchronously. Submit a job, poll for completion, then download the result.

| Model              | ID               | Resolution | Use Case               |
| ------------------ | ---------------- | ---------- | ---------------------- |
| **Lucy 2.1**       | `lucy-2.1`       | 720p       | Video editing (latest) |
| **Lucy 2.1 VTON**  | `lucy-2.1-vton`  | 720p       | Virtual try-on         |
| **Lucy Restyle 2** | `lucy-restyle-2` | 720p       | Video restyling        |

<Accordion title="Previous generation models">
  | Model         | ID          | Resolution | Use Case      |
  | ------------- | ----------- | ---------- | ------------- |
  | **Lucy Clip** | `lucy-clip` | 720p       | Video editing |
</Accordion>

## Image models

Image models edit and transform images.

| Model            | ID             | Resolution | Use Case      |
| ---------------- | -------------- | ---------- | ------------- |
| **Lucy Image 2** | `lucy-image-2` | 480p, 720p | Image editing |

## Latest aliases

Use `-latest` aliases to always target the newest version of a model family. The server resolves these to the current latest version automatically, so your code stays up to date without changes.

| Alias                 | Type             | Currently resolves to |
| --------------------- | ---------------- | --------------------- |
| `lucy-latest`         | realtime + video | `lucy-2.1`            |
| `lucy-vton-latest`    | realtime + video | `lucy-vton-2`         |
| `lucy-restyle-latest` | realtime + video | `lucy-restyle-2`      |
| `lucy-clip-latest`    | video            | `lucy-clip`           |
| `lucy-image-latest`   | image            | `lucy-image-2`        |

```typescript theme={null}
// Always use the latest Lucy model — no code changes needed when new versions ship
const model = models.realtime("lucy-latest");
const result = await client.queue.submitAndPoll({
  model: models.video("lucy-latest"),
  prompt: "Anime style",
  data: videoFile,
});
```

## Technical Specifications

### Video Requirements

All video models accept MP4 files with these specifications:

* **Format:** MP4 (H.264 or VP8 codec)
* **Aspect Ratio:** 16:9 or 9:16
* **File Size:** Maximum 200MB

## Choosing the Right Model

### Decision Matrix

| If you need to...                      | Use this model                        | Why?                                                                                        |
| -------------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------- |
| Transform or edit live video on camera | **Lucy 2.1** (`lucy-2.1`)             | Character reference images + text editing in one realtime model (latest)                    |
| Apply artistic styles to a live stream | **Lucy Restyle 2** (`lucy-restyle-2`) | Full scene restyling in realtime                                                            |
| Transform or edit existing video       | **Lucy 2.1** (`lucy-2.1`)             | Best quality, fastest speed, unlimited duration, supports prompt + reference image (latest) |
| Edit or transform an image             | **Lucy Image 2** (`lucy-image-2`)     | Precise image editing                                                                       |

### Quick Start Examples

<CodeGroup>
  ```typescript Lucy 2.1 (realtime) theme={null}
  import { createDecartClient, models } from "@decartai/sdk";

  const client = createDecartClient({ apiKey: "your-api-key-here" });
  const model = models.realtime("lucy-latest");
  const stream = await navigator.mediaDevices.getUserMedia({
    video: { frameRate: model.fps, width: model.width, height: model.height },
  });

  const realtimeClient = await client.realtime.connect(stream, {
    model,
    onRemoteStream: (s) => { document.getElementById("output").srcObject = s; },
  });

  // Character transformation
  const photo = document.querySelector("input[type=file]").files[0];
  await realtimeClient.set({ prompt: "Transform into this character", image: photo, enhance: true });
  ```

  ```typescript Lucy Restyle 2 (realtime) theme={null}
  import { createDecartClient, models } from "@decartai/sdk";

  const client = createDecartClient({ apiKey: "your-api-key-here" });
  const realtimeClient = await client.realtime.connect(stream, {
    model: models.realtime("lucy-restyle-2"),
    onRemoteStream: (s) => { document.getElementById("output").srcObject = s; },
    initialState: { prompt: { text: "Cartoon style", enhance: true } },
  });

  // Switch styles on the fly
  realtimeClient.setPrompt("Cyberpunk city");
  ```

  ```typescript Lucy 2.1 (batch) theme={null}
  import { createDecartClient, models } from "@decartai/sdk";

  const client = createDecartClient({ apiKey: "your-api-key-here" });
  const result = await client.queue.submitAndPoll({
    model: models.video("lucy-latest"),
    prompt: "Anime style transformation",
    data: videoFile,
    resolution: "720p",
  });

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

## Pricing

<Note>
  For detailed pricing information, see the [Pricing page](/getting-started/pricing).
</Note>

## Next Steps

<CardGroup cols={2}>
  <Card title="Lucy 2.1 Guide" icon="sparkles" href="/models/realtime/lucy-2.1">
    Character transformation with reference images in realtime
  </Card>

  <Card title="Use Cases" icon="lightbulb" href="/examples/use-cases">
    Explore what you can build with realtime and batch models
  </Card>

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

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

  <Card title="JavaScript SDK" icon="js" href="/sdks/javascript">
    Build with our JavaScript SDK
  </Card>

  <Card title="Streaming Best Practices" icon="bolt" href="/models/realtime/streaming-best-practices">
    Optimize your realtime integration
  </Card>
</CardGroup>
