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 | 204 |
high-4s | 340 |
standard-8s | 408 |
high-8s | 680 |
standard-10s | 510 |
high-10s | 850 |
standard-12s | 612 |
high-12s | 1020 |
standard-15s | 765 |
high-15s | 1275 |
Example result
Once the job is COMPLETED, the result object on GET /v2/jobs/:id looks like:
{
"videoUrl": "https://cdn2.apiframe.ai/videos/b2c3d4e5-f6a7-8901-bcde-f23456789012.mp4"
}See Result format for field details.
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