The Queue API enables asynchronous video generation for models that require longer processing times. Instead of waiting for a synchronous response, you submit a job and poll for completion.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/DecartAI/sdk/llms.txt
Use this file to discover all available pages before exploring further.
When to Use Queue API
The Queue API is designed for video generation models that take longer to process. All video models in the Decart SDK support the queue-based workflow.Supported Video Models
lucy-pro-t2v- Text-to-video (Pro quality)lucy-pro-i2v- Image-to-video (Pro quality)lucy-pro-v2v- Video-to-video (Pro quality)lucy-pro-flf2v- First-last-frame-to-video (Pro quality)lucy-dev-i2v- Image-to-video (Dev quality)lucy-fast-v2v- Video-to-video (Fast quality)lucy-motion- Motion-based image-to-video (trajectory-guided animation)lucy-restyle-v2v- Video restyling (video-to-video)
Queue Workflow
The queue-based processing follows a simple three-step flow:- Submit - Submit your job to the queue and receive a
job_id - Poll - Check the job status periodically until completion
- Retrieve - Download the generated video when the job completes
Automatic vs Manual Polling
The SDK provides two approaches:- Automatic: Use
client.queue.submitAndPoll()to submit and wait for completion in one call - Manual: Use
client.queue.submit(), then manually check status withclient.queue.status()and retrieve results withclient.queue.result()
Basic Example
Here’s a complete example using automatic polling:Job Lifecycle
A job progresses through these states:pending- Job is queued and waiting to startprocessing- Job is actively being processedcompleted- Job finished successfully, result is readyfailed- Job failed, error message available
Next Steps
Submit Jobs
Learn how to submit jobs for different model types
Polling
Understand automatic and manual polling strategies
Status & Errors
Handle job status and error cases