Video generation
Video generation runs as an async job: submit a prompt and any media, poll until the job completes, then download the MP4.
1. Submit
The response is 202 Accepted with a job whose status is queued.
To start from media, add public URLs in the fields the route expects; capabilities.input in the model catalog shows what it accepts. Gateway forwards extra fields unchanged, so field names, file limits, and rejections come from the vendor.
2. Poll
Poll until status is completed, usually one to a few minutes. The completed job carries the settled cost; a failed job carries the vendor error and bills nothing.
3. Download
The body is the raw MP4, or a JSON error if the job hasn’t completed.
Gateway keeps a job record for 24 hours after its last update, after which the job ID returns 404 video_job_not_found. Download the video soon after it completes.
List and delete
GET /v1/videos lists jobs from the last 24 hours, newest first. Pass the previous page’s last_id as after for the next page, and order=asc for oldest first. Entries show each job’s status from its last poll. DELETE /v1/videos/{video_id} removes a finished job; one still rendering returns 409 video_not_deletable. Usage and billing history are kept. The OpenAI SDK’s client.videos.list() and client.videos.delete() work against these endpoints; remix isn’t supported.
Reference
The job object has id, object, status, model, seconds, size, created_at, progress, error, and cost. Any key in your organization can read a job.
Video bills per output second at the served resolution’s rate in output_per_second_by_resolution, settled on the first poll or download that sees the job completed. Input media doesn’t change the rate. generate_audio isn’t forwarded, and the route bills at its with-audio rate. Customer budgets are checked at submit against the requested duration and tier.