For video processing (video editing, motion control), use the Queue API which provides asynchronous job-based processing.
Image
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 images.
Parameters:
options- Configuration object with model and inputs:model- Model frommodels.image()signal?- Optional AbortSignal for cancellation- Additional fields depend on the model (see below)
Promise<Blob> - The generated/transformed image
Inputs by Model:
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
Next Steps
Queue API
Asynchronous video processing with job-based queue
Realtime API
Transform video streams in realtime with WebRTC