Video generation (Sora)
Video & image generation
Video generation (Sora)
POST /v1/videos — text-to-video
POST
Video generation (Sora)
Generate video with Sora. It uses an asynchronous task flow: submit to get a task ID, poll until done, then download the video.
Submit a task
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
model | string | ✅ | sora-2 / sora-2-pro, etc. |
prompt | string | ✅ | Video description |
seconds | integer | Duration (seconds), typically 5-20 | |
size | string | Resolution, e.g. 1280x720 / 1920x1080 | |
aspect_ratio | string | 16:9 / 9:16 / 1:1 | |
n | integer | Number to generate (partially supported) | |
input_reference | object | An input reference image or video |
Response (task created)
Query task status
status possible values: queued / processing / completed / failed.
Polling guidance
- Start polling after an initial delay of 5-10 seconds.
- Poll every 10-30 seconds.
- It usually completes in 1-5 minutes.
- On failure, the
failure_reasonfield explains why.