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.
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
Run the example below
Copy the code, plug in your key, and you’ll see transformed video in seconds.
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-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
},
});
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 Processing Edit videos and control motion with AI
Image Editing Transform and edit images with text prompts
Realtime Video Editing Add, remove, or modify objects in live video with text prompts
More examples
Realtime Style Transfer
Video Editing
Image Editing
Apply artistic styles to a live camera stream: 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" );
Transform a video file with a single API call: 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 );
}
Edit an image synchronously: 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 );
View full 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
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