Skip to main content
Decart provides state-of-the-art AI models for transforming videos and images — both in realtime and as batch jobs — through a simple API.
New: Lucy 2 Realtime — Transform yourself into any character live on camera. Upload a reference image and see your movements mapped onto that character. Learn more →

Get started in 3 steps

1

Get your API key

Sign up at platform.decart.ai — you get free credits to start.
2

Install the SDK

npm install @decartai/sdk
Also available for Python, Swift, and Android.
3

Run the example below

Copy the code, plug in your key, and you’ll see transformed video in seconds.

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:
import { createDecartClient, models } from "@decartai/sdk";

const model = models.realtime("lucy_2_rt");
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
  },
});
See the Quickstart for full error handling, camera permission flows, and reconnection patterns.

What you can build

Realtime Character Transform

Become any character on camera with Lucy 2 — upload a face, see yourself transformed live

Realtime Style Transfer

Turn any live video stream into anime, cyberpunk, oil paintings, and more via WebRTC

Talking Avatars

Animate any portrait with audio — build virtual presenters and AI agents

Video Generation

Generate and edit videos from text, images, or existing footage

Image Generation

Create and edit images with text prompts

Realtime Video Editing

Add, remove, or modify objects in live video with text prompts

More examples

Apply artistic styles to a live camera stream:
import { createDecartClient, models } from "@decartai/sdk";

const model = models.realtime("mirage_v2");
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");
View full quickstart →

Which API should I use?

Most users start with the Realtime API above. If you need batch processing or image generation, here’s how the three APIs compare:
You want to…APISDK method
Transform live camera/video in an interactive appRealtime APIclient.realtime.connect()
Generate or edit videos asynchronouslyQueue APIclient.queue.submitAndPoll()
Generate or edit images synchronouslyProcess APIclient.process()

Explore

Lucy 2 Realtime

Our flagship realtime model — character transformation at 720p

All Models

Compare all Decart models side by side

Quickstart

Transform your first video in minutes

API Reference

Complete API documentation

SDKs

JavaScript, Python, Swift, and Android libraries

Examples

Realtime-first starter examples and repo links

Pricing

Simple pay-as-you-go pricing