Documentation Index Fetch the complete documentation index at: https://docs.toapis.com/llms.txt
Use this file to discover all available pages before exploring further.
Azure Sora 2 video generation model (official Azure OpenAI endpoint)
Use model parameter to select sora-2-official
Supports text-to-video, image-to-video, and remix
Async task management, query results by task ID
Authorizations
All endpoints require Bearer Token authentication Get your API Key from the API Key Management Page Add to request header: Authorization: Bearer YOUR_API_KEY
Body
Video generation model name Supported models:
sora-2-official - Azure Sora 2 official model
Example: "sora-2-official"
Natural-language description for video generation Include shot type, subject, action, setting, lighting, and camera motion to reduce ambiguity. Keep it single-purpose for best adherence. Example: "A golden retriever running on grass, sunny day"
Video duration in seconds Supported values:
4 - 4 seconds
8 - 8 seconds
12 - 12 seconds
Default: 4 Example: 12
Video aspect ratio Supported formats:
16:9 (Landscape, 1280×720)
9:16 (Portrait, 720×1280)
Default: 9:16
Array of reference image URLs for image-to-video generation ⚠️ URL format only
Publicly accessible image URL (http:// or https://)
You can use the Upload Image API to upload local images and get URLs
Only the first image will be used as reference
Supported formats: JPEG, PNG, WebP
Image size must be 1280×720 (16:9) or 720×1280 (9:16)
Response
Unique task identifier for status queries
Object type, always generation.task
Task status
queued - Queued for processing
in_progress - Processing
completed - Successfully completed
failed - Failed
Task progress percentage (0-100)
Task creation timestamp (Unix timestamp)
Task metadata including size and duration
cURL (Text-to-Video)
cURL (Image-to-Video)
Python
JavaScript
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "sora-2-official",
"prompt": "A golden retriever running on grass, sunny day",
"duration": 12,
"aspect_ratio": "16:9"
}'
{
"id" : "video_01K8SGYNNNVBQTXNR4MM964S7K" ,
"object" : "generation.task" ,
"model" : "sora-2-official" ,
"status" : "queued" ,
"progress" : 0 ,
"created_at" : 1768380224 ,
"metadata" : {
"size" : "1280x720" ,
"seconds" : "12"
}
}