sora-2 API Usage Guide
Overview
Sora-2 is OpenAI’s state-of-the-art video generation model that can create realistic and imaginative video content from text descriptions. The model excels at understanding complex prompts and generating coherent, high-quality videos with smooth motion, realistic physics, and detailed visual elements. It supports various aspect ratios and durations, making it suitable for a wide range of creative applications.Authentication
All API requests require authentication using an API key. Include your API key in the Authorization header:Submit Video Generation Request
Base URL
Endpoint
Request Format
Request Parameters
| Parameter | Type | Required | Description | Default | Constraints |
|---|---|---|---|---|---|
prompt | string | Yes | Text description of the video to generate (max 2000 characters). Include scenes, actions, camera moves, and visual style. | - | Required |
input_reference | string | No | The image MUST match the target video’s resolution (size).Supported file formats are: jpeg, png, and webp. | - | Max 1 image |
seconds | string | No | Duration of the video in seconds. | ”4” | Options: “4”, “8”, “12” |
size | string | No | Video resolution and aspect ratio. | ”1792x1024” | Options: “1280x720”, “720x1280” |
Response
Check Request Status
Endpoint
Example
Response
Request Status Values
| Status | Description |
|---|---|
queued | Request is waiting to be processed |
processing | Video generation is in progress |
success | Video generation completed successfully |
failed | Video generation failed |
cancelled | Request was cancelled |