The Queue API is the primary way to process videos with the Python SDK. Submit jobs that are processed asynchronously in the background, then poll for status and retrieve results when complete.Documentation Index
Fetch the complete documentation index at: https://docs.platform.decart.ai/llms.txt
Use this file to discover all available pages before exploring further.
All video processing (video editing, restyling, motion control) uses the Queue API. For image editing, use the Process API.
Overview
The Queue API provides four main methods:submit()- Submit a job and get a job ID immediatelystatus()- Check the status of a submitted jobresult()- Retrieve the completed videosubmit_and_poll()- Submit and automatically poll until completion
Submit a Job
Submit a video editing job and receive a job ID immediately:job_id- Unique identifier for the jobstatus- Initial status ("pending")
Check Job Status
Poll the status of a submitted job:| Status | Description |
|---|---|
pending | Job is queued, waiting to be processed |
processing | Job is currently being processed |
completed | Job finished successfully |
failed | Job failed or timed out (timeout after 10 minutes) |
Get Job Result
Retrieve the video once the job is completed:status- Either"completed"or"failed"data- Video bytes (when completed)error- Error message (when failed)
Submit and Poll
The easiest way to use the Queue API - submit a job and automatically poll until completion:- All standard model parameters (prompt, resolution, etc.)
on_status_change(optional) - Callback function called on each status change
Complete Example
Video Editing with Queue
Transform videos with style transfer:Manual Polling
For custom polling logic, you can manually poll for status:Error Handling
Supported Models
All non-realtime video models support queue processing:| Model | Type | Description |
|---|---|---|
lucy-2.1 | Video-to-Video | Video editing (latest) |
lucy-2.1-vton | Video-to-Video | Virtual try-on |
lucy-restyle-2 | Video-to-Video | Video restyling |
lucy-motion | Image-to-Video | Trajectory-based motion control |
Latest aliases
Latest aliases
| Alias | Description |
|---|---|
lucy-latest | Always the latest editing model |
lucy-vton-latest | Always the latest virtual try-on model |
lucy-restyle-latest | Always the latest restyling model |
lucy-clip-latest | Always the latest legacy editing model |
lucy-motion-latest | Always the latest motion model |
Previous generation models
Previous generation models
| Model | Type | Description |
|---|---|---|
lucy-clip | Video-to-Video | Transform video style |
API Reference
client.queue.submit(options)
Submit a job for processing.
Parameters:
options: dict- Model and input parameters
JobSubmitResponse
job_id: str- Unique job identifierstatus: str- Initial status (“pending”)
client.queue.status(job_id)
Check the status of a job.
Parameters:
job_id: str- The job identifier
JobStatusResponse
job_id: str- Job identifierstatus: str- Current status
client.queue.result(job_id)
Get the result of a completed job.
Parameters:
job_id: str- The job identifier
QueueJobResult
status: str- “completed” or “failed”data: bytes- Video data (when completed)error: str- Error message (when failed)
client.queue.submit_and_poll(options)
Submit a job and poll until completion.
Parameters:
options: dict- Model and input parameterson_status_change: Callable(optional) - Status change callback
QueueJobResult
Next Steps
Process API
Synchronous image editing
Realtime API
Transform video streams in realtime with WebRTC