Sora 2 Pro API

Integrate the Sora 2 Pro API

Build text-to-video, image-to-video, and storyboard workflows with predictable polling and credit control.

What the Sora 2 Pro API delivers

Everything you need to launch production-ready Sora 2 Pro pipelines.

Five model variants

Choose sora-2 text/image or sora-2-pro text/image/storyboard based on quality and cost.

Storyboard support

Define multi-shot narratives with shots[] and per-shot durations.

Unified responses

All endpoints return code/message/data, even when HTTP status is 200 on errors.

Authentication & Base URL

Base URL: https://freesoragenerator.com. Authenticate with an API key or a logged-in session cookie.

  • Authorization: Bearer [TOKEN] (API key sk- or JWT), or send a session cookie.
  • Send Content-Type: application/json with POST bodies.
  • Most errors still return HTTP 200; always inspect the code field.

Core endpoints

Create tasks with /sora-pro, then poll check-result for status.

Create generation task

Validate input, deduct credits, create a task, and return taskId.

Method: POSTPath: /api/v1/video/sora-pro

Payload parameters

  • Required. One of sora-2-text-to-video, sora-2-image-to-video, sora-2-pro-text-to-video, sora-2-pro-image-to-video, sora-2-pro-storyboard.
  • Conditional. Required for all models except sora-2-pro-storyboard.
  • Conditional. Base64 data URL like data:image/png;base64,... Required for image-to-video if no imageUrl.
  • Conditional. Public image URL used when imageData is not provided.
  • Optional. portrait or landscape. Default: landscape.
  • Optional. 10, 15, or 25 (storyboard only). Defaults vary by model.
  • Optional. standard or high. Only for Pro text/image models.
  • Optional. Remove watermark for non-storyboard models. Default: true.
  • Conditional. Required for sora-2-pro-storyboard. Array of '{ Scene, duration }'.

Notes

  • imageData takes precedence over imageUrl when both are provided.
  • prompt is optional for storyboard and is not sent to the provider; use shots for content.
  • nFrames is normalized to the allowed values per model.
  • removeWatermark defaults to true for non-storyboard models.
  • shots must include Scene (capital S) and duration > 0.

Sample requests

Text-to-video
curl -X POST https://freesoragenerator.com/api/v1/video/sora-pro \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2-pro-text-to-video",
    "prompt": "A cinematic shot of a futuristic city at sunset.",
    "aspectRatio": "landscape",
    "nFrames": "10",
    "size": "high",
    "removeWatermark": true
  }'
Image-to-video
curl -X POST https://freesoragenerator.com/api/v1/video/sora-pro \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2-image-to-video",
    "prompt": "Turn this image into a dynamic 10s clip.",
    "imageUrl": "https://example.com/reference.png",
    "aspectRatio": "portrait",
    "nFrames": "10"
  }'
Storyboard
curl -X POST https://freesoragenerator.com/api/v1/video/sora-pro \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2-pro-storyboard",
    "shots": [
      { "Scene": "Establishing shot of a city skyline at dusk", "duration": 5 },
      { "Scene": "Close-up of a runner splashing through puddles", "duration": 5 }
    ],
    "aspectRatio": "landscape",
    "nFrames": "10"
  }'

Sample response

{
  "code": 0,
  "message": "ok",
  "data": {
    "taskId": "281e5b0*********************f39b9"
  }
}

Query task status

Fetch status, progress, and result URLs by taskId.

Method: POSTPath: /api/video-generations/check-result

Payload parameters

  • Required. The taskId returned by create.

Notes

  • Status values: pending | running | succeeded | failed | cancelled.
  • result_url and result_urls return the final video links when ready.

Sample request

curl -X POST https://freesoragenerator.com/api/video-generations/check-result \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "taskId": "281e5b0*********************f39b9"
  }'

Sample response

{
  "code": 0,
  "message": "Success",
  "data": {
    "status": "running",
    "progress": 35,
    "result_url": "https://your-domain.com/storage/videos/xxx.mp4",
    "result_urls": [
      "https://your-domain.com/storage/videos/xxx.mp4"
    ],
    "failure_reason": "",
    "error_message": null
  }
}

Get user credits

Check current credit balance before submitting tasks.

Method: POSTPath: /api/get-user-credits

Notes

  • Optional endpoint; useful for preflight checks.
  • Returns left_credits and is_vip flags.

Sample request

curl -X POST https://freesoragenerator.com/api/get-user-credits \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Sample response

{
  "code": 0,
  "message": "ok",
  "data": {
    "left_credits": 120,
    "is_vip": false
  }
}

Common error codes

Errors are surfaced through the code field in the response body.

  • 401: Unauthorized
  • 402: Insufficient credits
  • -1: Invalid model parameter
  • -1: Prompt is required
  • -1: Image is required for image-to-video
  • -1: Shots is required for storyboard
  • -1: Failed to upload image
  • -1: Failed to create video generation record

Credits reference

Credits vary by model, size, and nFrames. Use this table as a baseline.

ModelParamsCredits
sora-2-text-to-video1020
sora-2-text-to-video1530
sora-2-image-to-video1020
sora-2-image-to-video1530
sora-2-pro-text-to-videostandard + 10375
sora-2-pro-text-to-videostandard + 15675
sora-2-pro-text-to-videohigh + 10825
sora-2-pro-text-to-videohigh + 151,575
sora-2-pro-image-to-videostandard + 10375
sora-2-pro-image-to-videostandard + 15675
sora-2-pro-image-to-videohigh + 10825
sora-2-pro-image-to-videohigh + 151,575
sora-2-pro-storyboard10375
sora-2-pro-storyboard15675
sora-2-pro-storyboard25675

1. Create the task

POST /api/v1/video/sora-pro with your model and payload.

2. Track progress

Poll /api/video-generations/check-result until the status is succeeded or failed.

3. Verify credits

Optionally call /api/get-user-credits before submitting large batches.

Frequently asked questions

Can I use API keys or session cookies?

Yes. Send Authorization: Bearer [TOKEN] (API key or JWT) or a logged-in session cookie.

How do I format storyboard shots?

Provide shots as an array of '{ Scene, duration }' where Scene is capitalized and duration is seconds.

Why do credits differ by model?

Credits scale with nFrames for all models; Pro models also vary by size.

Helpful resources

Start with the Sora 2 Pro API

Generate an API key and launch your first Sora 2 Pro workflow today.