Generated Video will appear here
import { readFileSync, writeFileSync } from "fs";
import { createDecartClient, models } from "@decartai/sdk";
const client = createDecartClient({
apiKey: "--your-api-key--"
});
const videoBuffer = readFileSync("/path/to/input.mp4");
const videoBlob = new Blob([videoBuffer], { type: "video/mp4" });
const result = await client.queue.submitAndPoll({
model: models.video("lucy-restyle-v2v"),
prompt: "Restyle the video into a watercolor painting",
data: videoBlob,
onStatusChange: (job) => console.log(`Status: ${job.status}`),
});
if (result.status === "completed") {
const buffer = Buffer.from(await result.data.arrayBuffer());
writeFileSync("output.mp4", buffer);
}Available Endpoints
Request Parameters
promptOptionalType:string
Describe the style you want to apply to the video.
reference_imageOptionalType:File
Upload an image to use as style reference (alternative to prompt).
dataRequiredType:File
The video you want to restyle. Supports MP4, WebM, and QuickTime formats up to 300MB.
resolutionOptionalType:string
Output video resolution. (default: 720p) (options: 720p)
Parameter
Type
Required
Description
promptstringNoDescribe the style you want to apply to the video.reference_imageFileNoUpload an image to use as style reference (alternative to prompt).dataFileYesThe video you want to restyle. Supports MP4, WebM, and QuickTime formats up to 300MB.resolutionstringNoOutput video resolution. (default: 720p) (options: 720p)Lucy Restyle v2v
Long-Form Video Restyling
Apply a new visual style to entire videos - not just short scenes. LSD Long-Form supports videos of any length up to 30 minutes, making it easy to restyle full videos from start to finish in a single workflow.
Pricing
Model
pro
720p
1 Creditsper 1s
Video models are charged per second of generated video. Final cost depends on video duration and selected resolution.