Overview
The Sora 2 Async API uses a standard asynchronous processing mechanism, ideal for scenarios requiring fine-grained control over the video generation workflow. Unlike the synchronous streaming API, the async API separates video generation into three independent steps, allowing more flexible task management and download timing.The Async API is particularly suitable for batch processing, background tasks, and scenarios requiring long wait times. If you need real-time progress feedback, we recommend using the Synchronous Streaming API.
Key Features
Independent Task Management
Get task ID after submission, query status anytime
Flexible Polling Strategy
Customize polling intervals to avoid unnecessary requests
Reliable Video Download
Independent download after completion, supports resume
Batch Processing Support
Submit multiple tasks simultaneously for efficient concurrent processing
Complete Workflow
The Async API follows a 3-step workflow:Typical generation time: 3-5 minutes. Recommended polling interval: 30 seconds, maximum wait time: 10 minutes.
API Endpoint
Step 1: Submit Video Generation Request
Request Parameters
| Parameter | Type | Required | Description | 
|---|---|---|---|
prompt | string | ✅ | Text description for video generation, detailed scene, action, and style recommended | 
model | string | ✅ | Fixed value: sora-2 | 
size | string | ✅ | 1280x720 (landscape) or 720x1280 (portrait) | 
seconds | string | ✅ | Video duration, options: 10 or 15 | 
input_reference | file | ❌ | Reference image file (PNG/JPG/JPEG), optional, for image-to-video | 
Text-to-Video Examples
Image-to-Video Examples
Upload a reference image to generate video based on the image.Response Format
Step 2: Poll Video Generation Status
After submitting the request, regularly poll to check video generation status.Request Method
Query Examples
Status Descriptions
| Status | Description | Next Action | 
|---|---|---|
submitted | Request submitted, waiting for processing | Continue polling | 
in_progress | Video generation in progress | Continue polling, check progress percentage | 
completed | Video generation completed | Can download video | 
failed | Video generation failed | Check error message, resubmit | 
In-Progress Response Example
Completed Response Example
Step 3: Download Generated Video
After video generation is complete (status is completed), you can download the video file.
Request Method
Download Examples
Video files may expire after a certain period. It’s recommended to download immediately after generation and save locally.
Best Practices
Prompt Writing Tips
A good prompt should include: scene description, subject action, camera style, artistic style.
Reference Image Recommendations
- Resolution: Recommended 1280x720 or higher
 - Format: PNG or JPG
 - File Size: < 10MB
 - Content: Clear, well-defined subject, good lighting
 - Relevance: Image content should relate to prompt description
 
Polling Strategy Recommendations
Recommended Settings
- Polling interval: 30 seconds
 - Maximum wait: 10 minutes (600 seconds)
 - Typical duration: 3-5 minutes
 
Avoid Settings
- Polling interval: < 30 seconds (may trigger rate limiting)
 - Maximum wait: < 5 minutes (may give up too early)
 
Error Retry Strategy
Quotas and Limits
| Limit | Value | Description | 
|---|---|---|
| Request Rate | 10 requests/minute | Exceeding returns 429 error | 
| Concurrent Tasks | 5 tasks | Number of videos processed simultaneously | 
| Video Duration | 10 or 15 seconds | Other durations not supported | 
| Image Size | < 10MB | Recommended < 5MB | 
| Prompt Length | < 1000 characters | Recommended 100-300 characters | 
Error Handling
Common Error Codes
| Status Code | Description | Solution | 
|---|---|---|
| 200 | Success | - | 
| 400 | Invalid request parameters | Check if all required parameters are complete | 
| 401 | Authentication failed | Check if API Key is correct | 
| 403 | Permission denied | Check if API Key is valid or balance sufficient | 
| 404 | Resource not found | Check if video_id is correct | 
| 429 | Too many requests | Increase polling interval | 
| 500 | Server error | Retry later | 
FAQ
How long does video generation take?
How long does video generation take?
Typically 3-5 minutes, depending on server load and video complexity. Recommended polling interval: 30 seconds, maximum wait time: 10 minutes.
What's the difference between Async API and Sync API?
What's the difference between Async API and Sync API?
- Async API: 3-step workflow (submit→poll→download), suitable for batch processing and background tasks, requires managing polling logic
 - Sync API: Streaming output, real-time progress, suitable for scenarios needing immediate feedback
 
Can I submit multiple video generation tasks simultaneously?
Can I submit multiple video generation tasks simultaneously?
Yes, up to 5 concurrent tasks are supported. You can submit multiple requests simultaneously and poll their status separately. Be careful not to exceed the request rate limit (10 requests/minute).
How long are video files stored?
How long are video files stored?
It’s recommended to download videos immediately after generation to avoid file expiration. Contact technical support for specific storage duration.
How to handle generation failures?
How to handle generation failures?
Check the error message in the response. Common causes:
- Content policy violation (modify prompt or change image)
 - Insufficient quota (recharge or upgrade plan)
 - Invalid parameters (check parameter format and values)
 - Server overload (retry later)
 
How to control landscape vs portrait orientation?
How to control landscape vs portrait orientation?
Control via the 
size parameter:1280x720: Landscape720x1280: Portrait