Video
Video Generation
Generate videos from text prompts:prompt(required) - Text description of the video to generateseed(optional) - Random seed for reproducible resultsresolution(optional) - Output resolution (e.g., “480p”, “720p”)orientation(optional) - Output orientation (“landscape”, “portrait”)
lucy-pro-t2v
Image Animation
Animate static images into videos:prompt(required) - Text description of the animation styledata(required) - Input image (File, Blob, URL, or ReadableStream)seed(optional) - Random seed for reproducible resultsresolution(optional) - Output resolution
lucy-dev-i2v, lucy-pro-i2v
Motion Control
Control object motion with precise trajectory paths:data(required) - Input image (File, Blob, URL, or ReadableStream)trajectory(required) - Array of keyframe coordinates:[{frame: number, x: number, y: number}]seed(optional) - Random seed for reproducible resultsresolution(optional) - Output resolution (currently only “720p”)
lucy-motion
For detailed documentation, see the Video Generation guide.
Video Editing
Transform and restyle existing videos:prompt(required) - Text description of the style transformationdata(required) - Input video (File, Blob, URL string, or ReadableStream)seed(optional) - Random seed for reproducible resultsresolution(optional) - Output resolutionenhance_prompt(optional) - Auto-enhance the prompt for better resultsnum_inference_steps(optional) - Number of inference steps (pro model only)
lucy-dev-v2v, lucy-pro-v2v
Image
Image Generation
Generate images from text prompts:prompt(required) - Text description of the image to generateseed(optional) - Random seed for reproducible resultsresolution(optional) - Output resolutionorientation(optional) - Output orientation (“landscape”, “portrait”)
lucy-pro-t2i
Image Editing
Transform and restyle existing images:prompt(required) - Text description of the style transformationdata(required) - Input image (File, Blob, URL, or ReadableStream)seed(optional) - Random seed for reproducible resultsresolution(optional) - Output resolutionenhance_prompt(optional) - Auto-enhance the prompt for better results
lucy-pro-i2i
Input Types
Thedata, start, and end parameters accept flexible input types:
Cancellation
Cancel long-running operations using AbortController:Error Handling
The SDK throws specific errors for different failure scenarios:API Reference
client.process(options)
Generate or transform media.
Parameters:
options- Configuration object with model and inputs:model- Model frommodels.video()ormodels.image()signal?- Optional AbortSignal for cancellation- Additional fields depend on the model (see below)
Promise<Blob> - The generated/transformed media
Inputs by Model:
Video Generation (lucy-pro-t2v)
Video Generation (lucy-pro-t2v)
prompt: string- Text description (required)seed?: number- Random seed for reproducibilityresolution?: string- Output resolution (e.g., “480p”, “720p”)orientation?: string- Output orientation (“landscape”, “portrait”)
Image Animation (lucy-pro-i2v, lucy-dev-i2v)
Image Animation (lucy-pro-i2v, lucy-dev-i2v)
prompt: string- Text description (required)data: FileInput- Input image (required)seed?: number- Random seedresolution?: string- Output resolution
Video Editing (lucy-pro-v2v, lucy-dev-v2v)
Video Editing (lucy-pro-v2v, lucy-dev-v2v)
prompt: string- Style description (required)data: FileInput- Input video (required)seed?: number- Random seedresolution?: string- Output resolutionenhance_prompt?: boolean- Auto-enhance promptnum_inference_steps?: number- Number of inference steps (pro only)
Image Generation (lucy-pro-t2i)
Image Generation (lucy-pro-t2i)
prompt: string- Text description (required)seed?: number- Random seedresolution?: string- Output resolutionorientation?: string- Output orientation
Image Editing (lucy-pro-i2i)
Image Editing (lucy-pro-i2i)
prompt: string- Style description (required)data: FileInput- Input image (required)seed?: number- Random seedresolution?: string- Output resolutionenhance_prompt?: boolean- Auto-enhance prompt
Motion Control (lucy-motion)
Motion Control (lucy-motion)
data: FileInput- Input image (required)trajectory: Array<{frame: number, x: number, y: number}>- Motion path (required)seed?: number- Random seedresolution?: string- Output resolution (default: “720p”)