Product Overview
Sora is OpenAI's text-to-video model. It generates high-quality, coherent video from text descriptions or static images. Key features include:
- Long single-clip duration
- Strong physics and motion
- Support for multiple resolutions and aspect ratios
Access Methods
1. API Access
Developers can call Sora via the OpenAI API. Typically you need:
- A valid
OPENAI_API_KEY - Sora access enabled on your account
- An SDK or client that supports Sora
2. Basic Request Format
# Example: Text-to-video request (check official docs for exact parameters)
import openai
client = openai.OpenAI()
response = client.videos.generate(
model="sora",
prompt="An orange cat napping on a sunny windowsill, occasionally blinking, with leaves swaying gently outside",
duration=5, # seconds
aspect_ratio="16:9"
)
3. Image-to-Video
If you have a static image, use it as the starting point for motion:
response = client.videos.generate(
model="sora",
image=open("scene.png", "rb"),
prompt="Clouds drift slowly, water ripples gently"
)
Parameter Reference
| Parameter | Description |
|----------------|--------------------------------------|
| prompt | Text description, core input |
| duration | Video duration in seconds |
| aspect_ratio | Aspect ratio, e.g. 16:9, 9:16 |
| resolution | Resolution (if supported) |
| image | Input image for image-to-video |
Check OpenAI's official documentation for exact parameters; they may change with updates.
Usage Tips
Prompt Writing
- Be specific: Clearly define subject, action, environment, lighting
- Keep it concise: Avoid long or contradictory descriptions
- Split when needed: Break complex scenes into multiple generations
Duration and Resolution
- Start with shorter clips (e.g., 5 seconds) when experimenting
- Choose aspect ratio based on platform (16:9 for landscape, 9:16 for portrait)
Errors and Retries
- If generation fails, simplify the prompt or adjust parameters and retry
- Check API error codes and messages for permission, quota, or other issues
Workflow Example
Summary
Sora provides powerful text-to-video and image-to-video capabilities via API. Understanding access, parameters, and prompt techniques helps you generate video that meets your expectations more efficiently.