OpenAI
OpenAI Sora 2
Create asynchronous video tasks with sora-2 via POST /v1/predictions (function video).
POST
Overview
OpenAI Sora 2 (sora-2) supports:
- Text-to-video —
prompt(up to 32,000 characters) - Reference-guided generation — optional
first_frame_url
Input parameters
| Field | Required | Default | Notes |
|---|---|---|---|
prompt | Yes | — | Max 32,000 characters |
aspect_ratio | No | 16:9 | 16:9 or 9:16 |
resolution | No | 720P | 720P only |
duration | No | 4 | 4, 8, or 12 seconds |
first_frame_url | No | — | Optional reference URL to guide generation |
Authorizations
Authorization: Bearer YOUR_API_KEY
Body
application/json
Model ID. Use sora-2 for this endpoint.
Available options:
sora-2 Example:
"sora-2"
Task type. Must be video for video generation.
Available options:
video Example:
"video"
Optional HTTPS callback URL when the task completes, fails, or is cancelled.
Response
Async task created