Skip to main content

Overview

Sora 2 Pro is an OpenAI video generation model for premium text-to-video and image-to-video workflows. Use this page when you are ready to call the API after trying the model in the APIXO playground.

Endpoint and authentication

Base URL:
All requests require your APIXO API key:
Submit requests also require:

Copy-paste async quickstart

This minimal request submits a text-to-video task and returns a taskId.
Successful response:
Save the taskId; you need it to poll for the final video.

Poll for result

Processing response:
Success response:
Failed response:
Parse resultJson after state becomes success:

Request body

Text-to-video

Image-to-video

Parameters

string
default:"async"
required
Result delivery mode. Use async for polling with statusTask, or callback for webhook delivery.
string
Required when request_type is callback. Must be a public URL that can receive the final task payload. See Webhooks.
object
required
Sora 2 Pro input parameters.

Response format

Submit task response

POST /generateTask/sora-2-pro returns a task ID when the task is accepted:
integer
API status code. 200 means the task was accepted.
string
Human-readable status message.
string
Unique task identifier used with the status endpoint.

Status response fields

string
Unique task identifier.
string
Current task state: pending, processing, success, or failed.
string
JSON string containing the generated video URLs. Present when state is success.
string
Machine-readable failure code. Present when state is failed.
string
Human-readable failure message. Present when state is failed.
integer
Task creation timestamp in Unix milliseconds.
integer
Task completion timestamp in Unix milliseconds. Present after completion.
integer
Processing duration in milliseconds. Present after successful completion.

Webhook callback mode

Use callback mode when your backend should receive the final result automatically instead of polling.
See Webhooks for delivery requirements and retry behavior.

Billing

Sora 2 Pro is billed per second. The selected output tier determines the per-second unit price, and the final task cost is:
For text-to-video, 720*1280 and 1280*720 use the 720p tier, while 1024*1792 and 1792*1024 use the 1080p tier. For image-to-video, the resolution value selects the tier directly. For current route and market comparison pricing, see Pricing.

Latency and polling

Video generation usually takes longer than image generation. Actual latency may vary by prompt complexity, selected duration, output tier, route health, and current queue load.
For production workloads, use callback mode to avoid frequent polling during long video generations.
Rate limits and concurrency can vary by account, API key, and route. If you receive 429, slow down requests and retry with backoff. For account-level details, see System APIs.

Errors and troubleshooting

HTTP errors

Task failures

Practical checks

  • prompt must be a non-empty string and must not exceed 5000 characters.
  • duration is required and must be 4, 8, or 12.
  • size is required only for text-to-video.
  • resolution and image_urls are required only for image-to-video.
  • image_urls must contain exactly 1 image URL. Use JPG, PNG, or WebP when possible, and keep the image under 10 MB to reduce upstream rejections.
See Error Codes for the full error reference.