Production-grade models. Simple API
Build the next generation of products with real-time generative video
import { createDecartClient, models } from "@decartai/sdk";const model = models.realtime("mirage_v2");// Get user's camera stream with model specifications
const stream = await navigator.mediaDevices.getUserMedia({
audio: true,
video: {
frameRate: model.fps,
width: model.width,
height: model.height,
}
});// Create a client
const client = createDecartClient({
apiKey: "your-api-key-here"
});// Connect and transform the video stream
const realtimeClient = await client.realtime.connect(stream, {
model,
onRemoteStream: (transformedStream) => {
// Display the transformed video
const videoElement = document.querySelector("#video-output");
videoElement.srcObject = transformedStream;
}
});// Change the style on the fly
realtimeClient.setPrompt("Cyberpunk city");// Disconnect when done
realtimeClient.disconnect();
const stream = await navigator.mediaDevices.getUserMedia({
audio: true,
video: {
frameRate: model.fps,
width: model.width,
height: model.height,
}
});// Create a client
const client = createDecartClient({
apiKey: "your-api-key-here"
});// Connect and transform the video stream
const realtimeClient = await client.realtime.connect(stream, {
model,
onRemoteStream: (transformedStream) => {
// Display the transformed video
const videoElement = document.querySelector("#video-output");
videoElement.srcObject = transformedStream;
}
});// Change the style on the fly
realtimeClient.setPrompt("Cyberpunk city");// Disconnect when done
realtimeClient.disconnect();
Build with us
Ground breaking real time models and lightning fast generative models
Realtime video editing
and restyling
<40ms per frame, create realtime video experiences like never before,
Lightning fast batch video editing and style transfer
Describe an idea, see it live. Choose from curated suggestions or create your own.
Image and video
generation
Transforming entire scenes without losing any details, while maintaining character stability.

