For video generation (text-to-video, image-to-video, video-to-video), use the Queue API which provides asynchronous job-based processing.
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 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 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