OpenAI Sora - Text to Video
Generate richly detailed, dynamic video clips with audio from natural language descriptions or reference images using OpenAI's state-of-the-art Sora models. Built on years of research into multimodal diffusion, Sora brings deep understanding of 3D space, motion, and scene continuity to text-to-video generation.
Endpoint
Request Headers
| Field | Value |
|---|---|
| API-KEY | <api-key> |
| Content-Type | application/json |
Request Parameters
| Field Name | Type | Example | Description | Required |
|---|---|---|---|---|
| type | string | TEXT_TO_VIDEO | Feature identifier | ✔️ |
| model | string | sora-2 | AI model to use (sora-2 or sora-2-pro) | ✔️ |
| conversationId | string | TEXT_TO_VIDEO | Conversation context | ✔️ |
| promptObject.prompt | string | Wide shot of a child flying a red kite | Text description of the video to generate | ✔️ |
| promptObject.seconds | number | 4 | Video duration in seconds (4, 8, or 12) | ✔️ |
| promptObject.size | string | 720x1280 | Output resolution (widthxheight) | ✔️ |
| promptObject.reference_image_path | string | images/2024_example.png | S3 path to optional reference image | ❌ |
| promptObject.reference_image_name | string | reference.jpg | Filename for reference image | ❌ |
| promptObject.reference_image_type | string | image/jpeg | MIME type of reference image | ❌ |
Available Models
Sora 2 (sora-2)
- Best for: Speed and flexibility, rapid iteration, concepting
- Use cases: Social media content, prototypes, rough cuts, exploration phase
- Quality: Good quality results with fast generation
- Supported resolutions: 720x1280 (Portrait), 1280x720 (Landscape)
Sora 2 Pro (sora-2-pro)
- Best for: Production-quality output, high fidelity
- Use cases: High-resolution cinematic footage, marketing assets, professional content
- Quality: Higher quality, more polished and stable results
- Supported resolutions:
- 720x1280 (Portrait)
- 1280x720 (Landscape)
- 1024x1792 (Portrait HD)
- 1792x1024 (Landscape HD)
Reference Image Guidelines
- Purpose: Acts as the first frame of your video
- Use cases: Preserving brand assets, characters, or specific environments
- Format: JPEG, PNG, or WebP
- Size limit: 10 MB
- Important: Image dimensions must match target video resolution
Code Examples
- cURL
- JavaScript
- Python
curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "TEXT_TO_VIDEO",
"model": "sora-2",
"conversationId": "TEXT_TO_VIDEO",
"promptObject": {
"prompt": "Wide shot of a child flying a red kite in a grassy park, golden hour sunlight, camera slowly pans upward",
"seconds": 8,
"size": "1280x720"
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'TEXT_TO_VIDEO',
model: 'sora-2',
conversationId: 'TEXT_TO_VIDEO',
promptObject: {
prompt: 'Wide shot of a child flying a red kite in a grassy park, golden hour sunlight, camera slowly pans upward',
seconds: 8,
size: '1280x720'
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"type": "TEXT_TO_VIDEO",
"model": "sora-2",
"conversationId": "TEXT_TO_VIDEO",
"promptObject": {
"prompt": "Wide shot of a child flying a red kite in a grassy park, golden hour sunlight, camera slowly pans upward",
"seconds": 8,
"size": "1280x720"
}
}
response = requests.post(url, headers=headers, json=data)
Example with Reference Image
- cURL
- JavaScript
- Python
curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "TEXT_TO_VIDEO",
"model": "sora-2-pro",
"conversationId": "TEXT_TO_VIDEO",
"promptObject": {
"prompt": "Camera slowly zooms in on the landscape as birds fly across the sky",
"seconds": 12,
"size": "1792x1024",
"reference_image_path": "uploads/user123/landscape.jpg",
"reference_image_name": "landscape.jpg",
"reference_image_type": "image/jpeg"
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'TEXT_TO_VIDEO',
model: 'sora-2-pro',
conversationId: 'TEXT_TO_VIDEO',
promptObject: {
prompt: 'Camera slowly zooms in on the landscape as birds fly across the sky',
seconds: 12,
size: '1792x1024',
reference_image_path: 'uploads/user123/landscape.jpg',
reference_image_name: 'landscape.jpg',
reference_image_type: 'image/jpeg'
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"type": "TEXT_TO_VIDEO",
"model": "sora-2-pro",
"conversationId": "TEXT_TO_VIDEO",
"promptObject": {
"prompt": "Camera slowly zooms in on the landscape as birds fly across the sky",
"seconds": 12,
"size": "1792x1024",
"reference_image_path": "uploads/user123/landscape.jpg",
"reference_image_name": "landscape.jpg",
"reference_image_type": "image/jpeg"
}
}
response = requests.post(url, headers=headers, json=data)
Interactive Playground
API Playground
https://api.1min.ai/api/featuresS3 path to reference image (acts as first frame)
Generated cURL Command:
curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "TEXT_TO_VIDEO",
"model": "sora-2",
"conversationId": "TEXT_TO_VIDEO",
"promptObject": {
"prompt": "Wide shot of a child flying a red kite in a grassy park, golden hour sunlight, camera slowly pans upward",
"seconds": 8,
"size": "1280x720"
}
}'
Response
{}