Goal
- Submit a video generation job.
- Poll until terminal.
- Download the result or fetch the binary content.
1. Create the job
id as soon as you receive it.
2. Respect the polling guidance
Poll the status endpoint and respect the gateway guidance where possible.statuspoll_after_secondscontent_urldownload_urloutputs
completedfailedcancelledexpired
3. Fetch the final output
When the job completes, choose the retrieval path that matches your app. Use content bytes directly:4. Treat failed jobs as first-class outcomes
Do not build only for the happy path. Capture:- the final job status
- any surfaced provider or error detail
- the gateway request id
5. When to switch to webhooks
Move to a webhook flow when:- users do not stay connected while the job runs
- you need server-side delivery to another system
- polling load becomes noisy at scale