{
"created": 1757165031,
"id": "task-unified-1757165031-uyujaw3d",
"model": "<string>",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 45
},
"type": "video"
}{
"error": {
"message": "Invalid request format",
"type": "invalid_request_error"
}
}{
"error": {
"message": "Invalid API key",
"type": "authentication_error"
}
}{
"error": {
"message": "Insufficient account balance",
"type": "insufficient_quota"
}
}{
"error": {
"message": "Parameter validation failed",
"type": "validation_error"
}
}{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"message": "Internal server error",
"type": "server_error"
}
}{
"error": {
"message": "Service temporarily unavailable, please try again later",
"type": "service_unavailable"
}
}Sora-2 Video Generation Preview
- Sora 2 video generation model, supports text-to-video and image-to-video
- Supports character consistency (character_ids)
- Async processing mode, use the returned task ID to query task status
- Generated video links are valid for 24 hours, please save them promptly
{
"created": 1757165031,
"id": "task-unified-1757165031-uyujaw3d",
"model": "<string>",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 45
},
"type": "video"
}{
"error": {
"message": "Invalid request format",
"type": "invalid_request_error"
}
}{
"error": {
"message": "Invalid API key",
"type": "authentication_error"
}
}{
"error": {
"message": "Insufficient account balance",
"type": "insufficient_quota"
}
}{
"error": {
"message": "Parameter validation failed",
"type": "validation_error"
}
}{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"message": "Internal server error",
"type": "server_error"
}
}{
"error": {
"message": "Service temporarily unavailable, please try again later",
"type": "service_unavailable"
}
}Authorizations
All APIs require Bearer Token authentication
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
sora-2: Standard version
sora-2-pro: Pro version, automatically generates audio
"sora-2"
"sora-2-pro"
Text prompt describing the video content you want to generate
Notes:
- Supports both Chinese and English
- When using character_ids, reference characters by name in the prompt
- Maximum
5000characters
5000"A lone astronaut stands on Mars, cinematic lighting"
Reference image URL list for image-to-video
Notes:
- Only supports 1 first-frame image
- Must be a publicly accessible image URL
["https://example.com/photo.jpg"]
Output video aspect ratio
Options:
16:9/1280x720— Landscape (default)9:16/720x1280— Portrait
"16:9"
Output video duration (seconds)
Options: 4, 8, 12, 16, 20
4
Output video resolution
Options:
720p— Standard definition (default)1080p— High definition
Note: sora-2-pro has higher pricing at 1080p
720p, 1080p Character ID list, maximum 2
Notes:
- Generated by the sora-2-character model
- Reference characters by name in the prompt
Do not pass this parameter unless necessary.
["char_abc"]
Whether to delete the video after retrieval
Notes:
- Default true (delete)
- Set to false to preserve the video for subsequent sora-2-pro-remix
Do not pass this parameter unless necessary.
true
Response
Task created successfully
Task creation timestamp
1757165031
Task ID
"task-unified-1757165031-uyujaw3d"
Actual model name used
Specific task type
video.generation.task Task progress percentage (0-100)
0 <= x <= 1000
Task status
pending, processing, completed, failed "pending"
Async task information
Show child attributes
Show child attributes
Task output type
video "video"