Sora 2 Pro
OpenAI Sora 2 Pro high-quality video generation with text-to-video and image-to-video
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/generateTask/sora-2-pro | Create generation task |
| GET | /api/v1/statusTask/sora-2-pro | Query task status |
Authentication
All requests require an API Key in the header:
Request Body
Parameters
Parameter
Required
Default
Description
request_typestring—
asyncasync (polling) or callback (webhook)
callback_urlstring✱
—
Callback URL, required when request_type=callback
providerstring—
autoRouting strategy: auto, value, or official
inputobject✓
—
Model input parameters
Mode Options:
text-to-video— Generate video from text promptimage-to-video— Generate video from reference image
Example
Text-to-Video
Image-to-Video
Response
POST /api/v1/generateTask/sora-2-pro
Returns taskId on success for subsequent status queries.
Success:
Error:
GET /api/v1/statusTask/sora-2-pro
Query task execution status and results via taskId.
Success:
Failed:
Status Response Fields
| Field | Type | Description |
|---|---|---|
taskId | string | Unique task identifier |
state | string | pending processing success failed |
resultJson | string | JSON containing resultUrls array (on success) |
failCode | string | Error code (on failure) |
failMsg | string | Error message (on failure) |
createTime | integer | Task creation timestamp (ms) |
completeTime | integer | Task completion timestamp (ms) |
costTime | integer | Processing duration (ms) |
Error Codes
| Code | Description |
|---|---|
| 400 | Invalid parameters or request error |
| 401 | Invalid or missing API Key |
| 429 | Rate limit exceeded |
| Fail Code | Description |
|---|---|
CONTENT_VIOLATION | Content violates safety guidelines |
INVALID_IMAGE_URL | Cannot access provided image URL |
Rate Limits
| Limit | Value |
|---|---|
| Requests | 60 / minute |
| Concurrent tasks | 10 |
Exceeding limits returns 429 error. Wait and retry.
Tips
- Generation time: Average ~3 minutes per video. Submit task, wait 120 seconds, then poll every 5 seconds.
- Callback mode: Due to long generation times, strongly recommend using
callbackmode. - Video expiration: Result URLs are valid for 15 days. Download promptly.
- Content moderation: Prompts must comply with content safety guidelines. Violations return
CONTENT_VIOLATION. - Image formats:
image_urlssupports JPG, PNG, WebP, max 10MB per image. - Duration options: 10s for standard clips, 15s for extended narratives.
- Official route durations: When using
provider=official, only 12-second output is supported. Regardless of thedurationvalue passed (10 or 15), the generated video will always be 12 seconds. Billing is calculated as the official per-second rate multiplied by 12. - Size vs Resolution:
sizeis used in text-to-video mode:720*1280(portrait),1280*720(landscape),1024*1792,1792*1024resolutionis used in image-to-video mode:720por1080p