All video processing (video editing, restyling, motion control) uses the Queue API. For realtime camera transformation, use the Realtime API.
Overview
The Queue API provides five methods:Quick Start
Submit a Job
Submit a video processing job and receive a job ID immediately:JobSubmitResponse
jobId: String- Unique job identifierstatus: JobStatus- Initial status (PENDING)
Check Job Status
Poll the status of a submitted job:Get Job Result
Download the completed video as raw bytes:ByteArray - The output video (MP4).
Submit and Poll
The easiest way to use the Queue API. Submit a job and automatically poll until completion:model(required) - Video model fromVideoModelsinput(required) - Typed input (e.g.,VideoEditInput,TextToVideoInput)onStatusChange(optional) - Callback invoked on each status change
submitAndPoll does not throw on job failure — it returns QueueJobResult.Failed. It will throw QueueSubmitException, QueueStatusException, or QueueResultException on network/API errors.Submit and Observe (Flow)
Get a reactiveFlow of progress updates, ideal for Jetpack Compose UIs:
QueueJobResult.InProgress- On each poll while pending/processingQueueJobResult.Completed- Terminal: contains the video bytesQueueJobResult.Failed- Terminal: contains the error message
Input Types
Each model category has a typed input class that enforces required fields at compile time.VideoEditInput
For video-to-video editing models:LUCY_2_1, LUCY_CLIP.
String
required
Text prompt describing the desired edit. Max 1000 characters. Can be empty string.
FileInput
required
Video file to transform.
FileInput
Optional reference image for style guidance.
Int
Seed for reproducible output (0–4294967295).
String
default:"720p"
Output resolution.
Boolean
default:"true"
Whether to AI-enhance the prompt.
VideoRestyleInput
For video restyling:LUCY_RESTYLE_2. Must provide exactly one of prompt or referenceImage (mutually exclusive).
FileInput
FileInput is a sealed class that wraps common Android file sources. All queue input types use it for file fields.
Error Handling
Queue methods throw typed exceptions on network/API errors:
All queue exceptions include an optional
statusCode: Int? for HTTP errors.
Manual Polling
For custom polling logic, combinesubmit(), status(), and result():
Supported Models
Latest aliases
Latest aliases
Previous generation models
Previous generation models
API Reference
client.queue.submit(model, input)
Submit a job for processing. Suspend function.
Parameters:
model: VideoModel- Video model fromVideoModelsinput: QueueJobInput- Typed input (e.g.,VideoEditInput)
JobSubmitResponse
jobId: String- Unique job identifierstatus: JobStatus- Initial status (PENDING)
InvalidInputException, QueueSubmitException
client.queue.status(jobId)
Check the status of a job. Suspend function.
Parameters:
jobId: String- Job ID fromsubmit()
JobStatusResponse
jobId: String- Job identifierstatus: JobStatus- Current status
QueueStatusException
client.queue.result(jobId)
Download the result of a completed job. Suspend function.
Parameters:
jobId: String- Job ID fromsubmit()
ByteArray - Output video bytes (MP4)
Throws: QueueResultException
client.queue.submitAndPoll(model, input, onStatusChange?)
Submit a job and auto-poll until completion. Suspend function.
Parameters:
model: VideoModel- Video modelinput: QueueJobInput- Typed inputonStatusChange: ((JobStatusResponse) -> Unit)?- Optional status callback
QueueJobResult.Completed or QueueJobResult.Failed
Throws: QueueSubmitException, QueueStatusException, QueueResultException on network errors
client.queue.submitAndObserve(model, input)
Submit a job and return a Flow of progress updates.
Parameters:
model: VideoModel- Video modelinput: QueueJobInput- Typed input
Flow<QueueJobResult> - Emits InProgress, then Completed or Failed
client.queue.release()
Release HTTP resources held by the queue client.
Next Steps
Realtime API
Transform camera video streams in realtime with WebRTC
SDK Overview
Installation, setup, and Android SDK fundamentals