Migrate from V1 to V2
The V1 video generation endpoints listed below are being deprecated. Migrate your integration to V2 before the deadline in your deprecation notice.
V2 uses the same authentication and generation request parameters as V1. The main change is the response flow: V1 keeps one HTTP request open and returns the generated file, while V2 creates a background job that you poll for its result.
Endpoint mapping
Change the version in each generation endpoint:
The media upload endpoint remains POST /v1/upload. You do not need to change uploaded ltx:// URIs or replace /v1/upload as part of this migration.
What changes
Your API key, request body, model selection, input URIs, and pricing do not change.
Migrate a request
For example, this V1 request waits for generation and writes the response body directly to a file:
With V2, send the same body to the V2 endpoint. The response contains a job ID:
Poll the matching endpoint with that ID:
When status is completed, download the output from result.video_url:
Update your application flow
Replace code that reads a video from the POST response with a submit, poll, and download loop.
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 when the status is completed or failed.
These minimal examples stop on HTTP errors. The cURL version uses jq to read fields out of the JSON responses. For production, add retries for polling and downloads as described in the production checklist.
Production checklist
- Use the recommended polling interval above and stop on both
completedandfailed. - Retry transient network and
5xxerrors on polling and downloadGETrequests with exponential backoff. - Handle errors from both the initial
POSTand a job withstatus: "failed". - Download or re-host outputs as soon as the job completes. Job status is kept for up to 24 hours, and output URLs expire independently of job status. See retention.
- Update handling for
429responses. V2 can returnrate_limit_errorwhen your organization’s job queue is full. - Keep logging the
x-request-idresponse header. See Debugging Requests. - Test each endpoint your integration uses before switching production traffic.
See Async Jobs for the complete job lifecycle and Error Handling for retry guidance and error types.