Video GenerationSora
Sora 2 Pro
OpenAI Sora 2 Pro video generation with standard and high resolution variants.
POST /v2/videos/generate — model: "sora-2-pro"
Sora 2 Pro supports both text-to-video and image-to-video generation with normalized duration, aspect ratio, and resolution controls.
See Video Generation overview for common request fields, response format, and error codes.
Model-specific parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
soraParams.duration | integer | 4 | Video duration in seconds: 4, 8, 10, 12, or 15 |
soraParams.aspect_ratio | string | "16:9" | Output aspect ratio: "16:9" or "9:16" |
soraParams.resolution | string | "standard" | Output quality: "standard" or "high" |
soraParams.start_image | string | — | URL of an image to use as the first frame |
Credit cost
| Variant | Credits |
|---|---|
standard-4s | 12 |
high-4s | 20 |
standard-8s | 24 |
high-8s | 40 |
standard-10s | 30 |
high-10s | 50 |
standard-12s | 36 |
high-12s | 60 |
standard-15s | 45 |
high-15s | 75 |
Code examples
curl -X POST https://api.apiframe.ai/v2/videos/generate \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a sweeping aerial shot above alpine mountains at sunrise",
"model": "sora-2-pro",
"soraParams": {
"duration": 15,
"aspect_ratio": "16:9",
"resolution": "high"
}
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/videos/generate",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"prompt": "a sweeping aerial shot above alpine mountains at sunrise",
"model": "sora-2-pro",
"soraParams": {
"duration": 15,
"aspect_ratio": "16:9",
"resolution": "high",
},
},
)
print(response.json())const response = await fetch("https://api.apiframe.ai/v2/videos/generate", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "a sweeping aerial shot above alpine mountains at sunrise",
model: "sora-2-pro",
soraParams: {
duration: 15,
aspect_ratio: "16:9",
resolution: "high",
},
}),
});
console.log(await response.json());Try it
POST
/v2/videos/generateTry it