ApiframeApiframe Docs
Video GenerationSora

Sora 2 Pro

OpenAI Sora 2 Pro video generation with standard and high resolution variants.

Use in Apiframe Studio

POST /v2/videos/generatemodel: "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

ParameterTypeDefaultDescription
soraParams.durationinteger4Video duration in seconds: 4, 8, 10, 12, or 15
soraParams.aspect_ratiostring"16:9"Output aspect ratio: "16:9" or "9:16"
soraParams.resolutionstring"standard"Output quality: "standard" or "high"
soraParams.start_imagestringURL of an image to use as the first frame

Credit cost

VariantCredits
standard-4s12
high-4s20
standard-8s24
high-8s40
standard-10s30
high-10s50
standard-12s36
high-12s60
standard-15s45
high-15s75

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

On this page