Video
Video generation is asynchronous. Create a task, store its ID, poll the task status, and download the result after completion.
The general video endpoints are:
Create a video task
The /v1/videos endpoint accepts multipart form data:
For image-to-video input, include a reference file when supported by the model:
A successful response includes a task identifier such as id, plus task metadata such as status, progress, model, duration, or timestamps when available.
Check task status
Poll at a reasonable interval. Stop polling when the task reaches a terminal success or failure state.
Download the result
After the task completes:
Recommended task workflow
- Validate the model, duration, and input before submission.
- Submit the task once.
- Persist the returned task ID.
- Poll with backoff instead of rapid repeated requests.
- Record terminal errors for troubleshooting.
- Download completed content promptly.
Do not automatically create a replacement task when a status request times out. First query the original task ID to avoid duplicate generation and duplicate charges.
Provider-specific video APIs
The API specification also includes provider-compatible video paths, including Kling-style and other task formats. Request fields and status responses differ across these endpoints. Use the general /v1/videos flow for new integrations unless a model or existing client requires a provider-specific path.
See the API Reference for the currently exposed paths and schemas.
Cost controls
Video cost can depend on the model, duration, resolution, quality, or input type. Review Pricing and start with short test jobs before running automated batches.
