Async Jobs
The async API (V2) lets you submit a generation request and poll for its response. The result is downloadable using a URL available when the job completes.
Lifecycle
- Submit.
POSTto an async endpoint (/v2/{endpoint}) with your generation parameters. The response is202 Acceptedwith a job ID. - Poll.
GET /v2/{endpoint}/{id}every few seconds until thestatusfield iscompletedorfailed. - Download. When
statusiscompleted, theresultobject contains one or more URLs pointing to the generated output files.
Status values
completed and failed are terminal — stop polling when you see either.
Result format
The result object on a completed job is a map of output labels to URLs. The available keys depend on the endpoint — most video endpoints return video_url, while video-to-video-hdr returns both exr_frames_url and video_url, and video-alpha-gen returns matte_video_url and cutout_video_url. Check each endpoint’s reference for the exact shape.
Polling guidance
We recommend waiting at least 5 seconds between polls. Choose a slightly different delay each time to spread out requests when polling multiple jobs.
- Stop polling when the status is
completedorfailed. - Retry transient
5xxresponses and network failures on polling and downloadGETrequests with exponential backoff. The examples below omit retry logic for brevity. - A
404means the job doesn’t exist or has expired (see retention below).
Retention
Job status is available for up to 24 hours after the job reaches a terminal state, and can be removed sooner. Once it’s removed, GET /v2/{endpoint}/{id} returns 404.
When you check a completed video generation job, each LTX-hosted file in result has a signed download URL that expires one hour later. To get fresh URLs, check the same job again while the job and its files are still available. Download and save any files you want to keep.
Error handling
Errors appear in two places but use the same { type, message } shape:
- HTTP errors on
POSTorGETrequests — validation, auth, rate limits, etc. - Job failures inside the status response when a job fails during processing. Polling a failed job still returns
200.
Your error handling logic can use the same type checks (e.g., invalid_request_error) regardless of where the error appears. See Error Handling for the full list.
Example
A complete submit → poll → download loop. The cURL version uses jq to read fields out of the JSON responses: