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

Transform and edit live video streams in realtime with AI. Our realtime models enable creative style transformations and precise video editing with minimal latency.

Choose between style transformation (Lucy Restyle Live) for artistic effects or video editing and character transformation (Lucy 2.1) for adding, changing, or removing elements and becoming any character.

## Available Models

We offer specialized realtime models, each optimized for different use cases:

| Model                 | Use Case                            | Example Prompts                                                       | Best For                                                     |
| --------------------- | ----------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------ |
| **Lucy Restyle Live** | Style transformation                | "Anime style", "Cyberpunk city", "Studio Ghibli animation"            | Creative effects, artistic filters, visual themes            |
| **Lucy 2.1**          | Video editing + character reference | "Transform into this character", "Add a dog", "Change hair to blonde" | Character transformation, object manipulation, scene editing |

### Lucy Restyle Live - Video Restyling

Transform the overall visual style and aesthetic of your video stream. Perfect for creative applications, social media filters, and artistic effects.

### Lucy 2.1 - Video Editing & Character Reference

Make specific edits to videos by adding, modifying, or removing objects and elements. Lucy 2.1 (`lucy-2.1`) also supports character reference images — upload any face and see yourself transformed into that character in realtime.

## Quick Start

### Installation

```bash theme={null}
npm install @decartai/sdk
```

### Basic Usage

<Tabs>
  <Tab title="Video Editing (Lucy 2.1)">
    ```tsx theme={null}
    import { createDecartClient, models } from "@decartai/sdk";

    // Use Lucy 2.1 for video editing — supports text prompts and character reference
    const model = models.realtime("lucy-latest");

    const stream = await navigator.mediaDevices.getUserMedia({
      video: {
        frameRate: model.fps,
        width: model.width,
        height: model.height,
      }
    });

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

    const realtimeClient = await client.realtime.connect(stream, {
      model,
      onRemoteStream: (editedStream) => {
        videoElement.srcObject = editedStream;
      },
    });

    // Text-only editing
    await realtimeClient.set({ prompt: "Add a small dog in the background", enhance: true });

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

  <Tab title="Video Restyling (Lucy Restyle Live)">
    ```tsx theme={null}
    import { createDecartClient, models } from "@decartai/sdk";

    // Use Lucy Restyle Live for style transformation
    const model = models.realtime("lucy-restyle-2");

    const stream = await navigator.mediaDevices.getUserMedia({
      video: {
        frameRate: model.fps,
        width: model.width,
        height: model.height,
      }
    });

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

    const realtimeClient = await client.realtime.connect(stream, {
      model,
      onRemoteStream: (transformedStream) => {
        videoElement.srcObject = transformedStream;
      },
      initialState: {
        prompt: { text: "Anime style", enhance: true }
      }
    });

    // Change styles dynamically
    realtimeClient.setPrompt("Cyberpunk city");
    realtimeClient.setPrompt("Studio Ghibli animation");
    ```
  </Tab>
</Tabs>

## Use Cases & Examples

### Video Restyling with Lucy Restyle Live

Perfect for creative applications and visual effects:

* **Social Media Filters**: "Anime style", "Vintage film", "Oil painting"
* **Content Creation**: "Studio Ghibli animation", "Cyberpunk aesthetic", "Watercolor art"
* **Live Streaming**: "Cartoon style", "Neon synthwave", "Impressionist painting"
* **Virtual Events**: "Fantasy world", "Futuristic setting", "Medieval theme"

### Video Editing & Character Transform with Lucy 2.1

Ideal for content modification, character-driven experiences, and interactive apps:

* **Character Transformation**: Upload a reference image and become that character — your movements and expressions map onto the reference identity
* **Object Addition**: "Add a dog running around", "Add birds flying overhead", "Add flowers in the foreground"
* **Appearance Changes**: "Change hair to blonde", "Add sunglasses", "Change shirt color to red"
* **Object Removal**: "Remove the car from the scene", "Remove the tree", "Remove background objects"
* **Scene Modifications**: "Replace the background with a beach", "Add snow falling", "Change day to night"

## Getting Started

Choose your model based on your use case:

<CardGroup cols={3}>
  <Card title="Video Restyling" icon="palette" href="/models/realtime/video-restyling">
    Transform video styles with the Lucy Restyle Live model. Perfect for creative effects and artistic transformations.
  </Card>

  <Card title="Lucy 2.1" icon="sparkles" href="/models/realtime/lucy-2.1">
    Character transformation and video editing with Lucy 2.1.
  </Card>

  <Card title="Video Editing (Legacy)" icon="pen-to-square" href="/models/realtime/video-editing">
    Edit video content with the original Lucy model.
  </Card>
</CardGroup>
