2 Credits Per Second
2 Credits Per Second
Input
Press play to start with camera
Output
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();Available Endpoints
Request Parameters
promptRequiredType:string
Style transformation description
streamRequiredType:File
Video stream (WebRTC)
Parameter
Type
Required
Description
promptstringYesStyle transformation descriptionstreamFileYesVideo stream (WebRTC)MirageLSD
Restyle video in realtime
MirageLSD is a zero-latency, autoregressive video model - generating video infinitely and in real time. It allows restyling of any video, instantly adapts to input and keeps temporal coherence.
Pricing
Model
pro
720p
2 Creditsper 1s
Video models are charged per second of generated video. Final cost depends on video duration and selected resolution.