Skip to main content
Decart’s models power a range of creative and production applications — from realtime character transformation on mobile to batch video processing for content pipelines. This page highlights the most common use cases with recommended models and starter code for each.

Realtime use cases

Realtime models process live video and audio over WebRTC with sub-second latency. They run continuously as long as the connection is open.

Character transformation

Become any character on camera with Lucy 2. Upload a reference image and your movements map onto that identity in realtime.

Live streaming effects

Apply artistic styles to live video with Lucy Restyle Live. Transform your stream into anime, cyberpunk, oil painting, and more.

Realtime video editing

Add, modify, or remove objects in live video with Lucy 2. Change outfits, add accessories, or swap backgrounds with text prompts.

Talking avatars

Animate any portrait with audio using Avatar Live. Build AI agents, virtual presenters, or interactive characters that speak naturally.

Character transformation with Lucy 2

Turn yourself into any character — live on camera. Lucy 2 takes a reference image and maps your facial expressions, head movements, and gestures onto that character. Best for: virtual cosplay, social filters, virtual try-on, character-driven content creation.
import { createDecartClient, models } from "@decartai/sdk";

const client = createDecartClient({ apiKey: "your-api-key-here" });
const model = models.realtime("lucy_2_rt");

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: (transformed) => {
    document.getElementById("output").srcObject = transformed;
  },
});

// Upload a character reference and transform
const characterPhoto = document.querySelector("input[type=file]").files[0]; // from file input
await realtimeClient.set({
  prompt: "Transform into this character",
  image: characterPhoto, // File, Blob, or URL
  enhance: true,
});

// Switch characters without reconnecting
const anotherPhoto = await fetch("/another-character.jpg").then((r) => r.blob());
await realtimeClient.set({ prompt: "Transform into this character", image: anotherPhoto });
Lucy 2 also works without a reference image — pass only a prompt to set() for text-based editing.

Live streaming effects with Lucy Restyle Live

Transform the entire visual style of a live video feed. Lucy Restyle Live applies artistic styles in realtime — ideal for Twitch, YouTube Live, or TikTok. Best for: social media filters, creative livestreams, virtual events, themed video calls.
import { createDecartClient, models } from "@decartai/sdk";

const client = createDecartClient({ apiKey: "your-api-key-here" });
const model = models.realtime("mirage_v2");

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: (styled) => {
    document.getElementById("output").srcObject = styled;
  },
});

// Apply a style
realtimeClient.setPrompt("Studio Ghibli animation style", { enhance: true });

// Switch styles on the fly
realtimeClient.setPrompt("Cyberpunk city with neon lighting");
realtimeClient.setPrompt("Watercolor painting with soft edges");

Realtime video editing with Lucy 2

Make targeted edits to live video using text prompts. Add objects, change clothing, swap backgrounds — all without interrupting the stream. Best for: interactive experiences, photo booths, AR-style effects, live content creation.
import { createDecartClient, models } from "@decartai/sdk";

const client = createDecartClient({ apiKey: "your-api-key-here" });
const model = models.realtime("lucy_2_rt");

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: (edited) => {
    document.getElementById("output").srcObject = edited;
  },
});

// Add objects, change outfits, modify the scene
await realtimeClient.set({ prompt: "Add a small dog running around", enhance: true });
await realtimeClient.set({ prompt: "Change the outfit to a sharp black tuxedo with satin lapels" });
await realtimeClient.set({ prompt: "Replace the background with a beach at sunset" });
If you maintain an older integration, lucy_v2v_720p_rt remains available. lucy_2_rt adds character reference support in the same realtime flow.

Talking avatars with Avatar Live

Animate any portrait photo with audio input. The avatar speaks with synchronized lip movements and natural facial expressions — no camera needed. Best for: AI customer agents, virtual presenters, educational content, interactive characters.
import { createDecartClient, models } from "@decartai/sdk";

const client = createDecartClient({ apiKey: "your-api-key-here" });
const model = models.realtime("live_avatar");

const avatarImage = await fetch("/portrait.jpg").then((r) => r.blob());

const realtimeClient = await client.realtime.connect(null, {
  model,
  initialState: {
    image: avatarImage,
    prompt: { text: "Speak warmly and nod occasionally", enhance: true },
  },
  onRemoteStream: (animated) => {
    document.getElementById("avatar").srcObject = animated;
  },
});

// Send audio to animate the avatar
const audioFile = document.querySelector("input[type=file]").files[0];
await realtimeClient.playAudio(audioFile);
Avatar Live accepts audio as File, Blob, or ArrayBuffer. You can also record from the microphone and send clips as they’re captured.

Batch use cases

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

Video editing

Transform and edit existing videos — change styles, replace objects, or modify scenes.

Image editing

Edit existing images with precise text-driven control.

Motion control

Control object motion with trajectory paths using Lucy Motion.

Video editing

Transform existing videos with text instructions. Change styles, replace objects, or modify entire scenes while preserving the original motion. Best for: post-production, content repurposing, brand transformations, visual effects.
import { createDecartClient, models } from "@decartai/sdk";
import { readFileSync, writeFileSync } from "fs";

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

const videoBlob = new Blob([readFileSync("input.mp4")], { type: "video/mp4" });

const result = await client.queue.submitAndPoll({
  model: models.video("lucy-2-v2v"),
  data: videoBlob,
  prompt: "Replace the person's outfit with a medieval knight's armor",
  onStatusChange: (job) => console.log(`Status: ${job.status}`),
});

if (result.status === "completed") {
  const buffer = Buffer.from(await result.data.arrayBuffer());
  writeFileSync("edited.mp4", buffer);
}

Image editing

Apply edits to existing images with text instructions. Best for: product mockups, creative assets, visual prototyping, style transfers.
import { createDecartClient, models } from "@decartai/sdk";

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

const result = await client.process({
  model: models.image("lucy-pro-i2i"),
  data: "https://example.com/room.jpg", // File, Blob, URL, or ReadableStream
  prompt: "Change the wall color to deep burgundy, keep everything else the same",
  enhance_prompt: true,
});

Choosing between realtime and batch

RealtimeBatch
LatencySub-second (WebRTC)Seconds to minutes (async jobs)
InputLive camera or video streamPre-recorded files
ConnectionPersistent — runs as long as connectedOne-shot — submit, poll, download
PricingPer second of connection timePer second of output video
Best forInteractive apps, live streaming, mobilePost-production, content pipelines, automation
Realtime and batch models use the same @decartai/sdk package. The difference is how you connect — client.realtime.connect() for realtime, client.queue.submitAndPoll() for video, client.process() for images.

Next steps

Lucy 2 guide

Deep dive into character transformation with reference images.

Realtime mobile app

Build a complete Expo app with model switching and style presets.

Quickstart

Get your first API call running in under 5 minutes.

All models

Compare every Decart model — realtime and batch — side by side.