Decart Logo
  • Real-time
  • Lucy Edit Live
    Lucy Edit LiveRealtime Video Editing
  • Lucy Restyle Live
    Lucy Restyle LiveRealtime Video Restyling
  • LipSync Live
    LipSync LiveRealtime Lips movement
  • Avatar Live
    Avatar LiveRealtime Avatar animation
  • Video models
  • Lucy
    LucyText/Image to Video
  • Lucy Edit
    Lucy EditVideo to Video
  • Lucy Edit
    Lucy Edit 2Long Video Editing
  • Lucy Motion
    Lucy MotionImage to Video
  • Lucy Restyle Live
    Lucy RestyleLong Video Restyling
  • Image models
  • Lucy Image
    Lucy ImageText to Image
  • Lucy Image Edit
    Lucy Image EditImage to Image
  • Cookbook icon
    Cookbook
  • Documentation icon
    Documentation
  1. Models
  2. Lucy Edit
Lucy Edit icon

Lucy Edit

Lucy Edit is a model that edits videos from text descriptions.

Lucy Edit is a model that edits videos from text descriptions.

Documentation
Your browser does not support the video tag.
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" });

// Optional: provide a reference image to guide the edit
const imageBuffer = readFileSync("/path/to/reference.jpg");
const imageBlob = new Blob([imageBuffer], { type: "image/jpeg" });

const result = await client.queue.submitAndPoll({
  model: models.video("lucy-pro-v2v"),
  prompt: "Change their shirt to black and shiny leather",
  data: videoBlob,
  reference_image: imageBlob, // Optional
  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

promptRequired
Type:string

Describe the changes you want to make to the video. Be specific about what elements to modify while preserving temporal consistency and motion.

dataRequired
Type:File

The video you want to edit. Supports MP4, WebM, and QuickTime formats up to 200MB. Output video is limited to 5 seconds.

reference_imageOptional
Type:File

Upload a reference image to guide the edit (e.g., an image of the hat you want to add).

resolutionOptional
Type:string

Output video resolution. Higher resolutions provide more detail but take longer to process. (default: 720p) (options: 720p)

Parameter
Type
Required
Description
promptstringYesDescribe the changes you want to make to the video. Be specific about what elements to modify while preserving temporal consistency and motion.
dataFileYesThe video you want to edit. Supports MP4, WebM, and QuickTime formats up to 200MB. Output video is limited to 5 seconds.
reference_imageFileNoUpload a reference image to guide the edit (e.g., an image of the hat you want to add).
resolutionstringNoOutput video resolution. Higher resolutions provide more detail but take longer to process. (default: 720p) (options: 720p)

Lucy Video Edit

Edit videos with text prompts for controlled results

LucyEdit enables controlled video edits. Modify specific elements - like clothing changes and character replacements - with flawless motion consistency, preserving the rest of the scene. Available in pro for even higher quality results.

Pricing

Model
pro
720p
15 Creditsper 1s
Model
fast
720p
4 Creditsper 1s

Video models are charged per second of generated video. Final cost depends on video duration and selected resolution.

Examples