Sora 2
OpenAI Sora 2 with cinematic quality and advanced narrative capabilities
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/generateTask/sora-2 | Create generation task |
| GET | /api/v1/statusTask/sora-2 | 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 textimage-to-video— Generate video from image
Example
Text-to-Video
Image-to-Video
Response
POST /api/v1/generateTask/sora-2
Returns taskId on success for subsequent status queries.
Success:
Error:
GET /api/v1/statusTask/sora-2
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 | 10000 / minute |
| Concurrent tasks | 1000 |
Exceeding limits returns 429 error. Wait and retry.
Tips
- Generation time:
- 10-second video: ~3-5 minutes
- 15-second video: ~4-6 minutes
- Sora 2 generation takes longer, always use
callbackmode - Submit task, wait 180 seconds, then poll every 10 seconds
- Cinematic quality: Sora 2 is known for ultra-high quality and cinematic narrative capabilities, one of the most advanced video generation models.
- Callback mode: Due to long generation times (several minutes), strongly recommend using
callbackmode. - Video expiration: Result URLs are valid for 15 days. Download promptly.
- Content moderation: Prompts must comply with content safety guidelines.
- Aspect ratio selection:
landscape: Landscape (default), for traditional video platforms, films, desktop viewingportrait: Portrait, for short video platforms, mobile viewing, social media
- Watermark handling:
remove_watermark: true: Auto-remove watermark (default, highly recommended)remove_watermark: false: Keep original watermark
- Long prompts: Sora 2 supports up to 10000-character prompts with exceptional understanding for complex narratives and detailed descriptions.
- Prompt best practices:
- Camera description: Use film terminology (e.g., "slow dolly in", "orbiting shot", "aerial view", "handheld")
- Lighting effects: Describe lighting and atmosphere (e.g., "golden hour", "dramatic lighting", "soft diffused light", "backlit silhouette")
- Emotional tone: Convey mood (e.g., "warm", "tense", "epic", "dreamlike")
- Action details: Describe character/object movements (e.g., "slowly turns", "flowing hair", "swaying leaves")
- Scene transitions: Describe how shots unfold (e.g., "zoom from wide to close", "descend through clouds")
- Image-to-video:
- Extends a single image into a complete video
- Reference image becomes start frame or key frame
- Describe desired animation effects, camera movement, and narrative development in prompt
- Ideal for character animation, scene expansion, bringing still images to life
- Duration selection:
- 10 seconds: Quick previews, social media clips
- 15 seconds: More narrative space, complete story segments
- Image formats:
image_urlssupports JPG, PNG, WebP, max 10MB per image. - Professional use:
- Ideal for movie trailers, commercials, music videos, proof of concept
- Supports complex narratives and character interactions
- Can generate coherent multi-shot scenes
- Performance tips:
- Avoid submitting many tasks during peak hours
- Clear, structured prompts improve success rates
- Test with 10-second first, then generate 15-second once satisfied