Documentation Index
Fetch the complete documentation index at: https://apixo.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Sora 2 is an OpenAI video model for text-to-video and single-image-to-video workflows. Use this page when you are ready to call the API after trying the model in the APIXO playground.| Capability | Value |
|---|---|
| Model ID | sora-2 |
| Modes | text-to-video, image-to-video |
| Prompt length | 1-10000 characters |
| Reference images | Exactly 1 URL for image-to-video |
| Aspect ratios | landscape, portrait |
| Durations | 4, 8, 12 seconds |
| Output format | MP4 video URLs |
Endpoint and authentication
Base URL:| Method | Endpoint | Purpose |
|---|---|---|
POST | /generateTask/sora-2 | Submit a generation task |
GET | /statusTask/sora-2?taskId={taskId} | Poll task status and retrieve results |
Copy-paste async quickstart
This minimal request submits a text-to-video task and returns ataskId.
taskId; you need it to poll for the final result.
Poll for result
resultJson after state becomes success:
Request body
Text-to-video
Image-to-video
Parameters
Result delivery mode. Use
async for polling with statusTask, or callback for webhook delivery.Required when
request_type is callback. Must be a public HTTPS URL that can receive the final task payload. See Webhooks.Sora 2 input parameters.
Response format
Submit task response
POST /generateTask/sora-2 returns a task ID when the task is accepted:
API status code.
200 means the task was accepted.Human-readable status message.
Unique task identifier used with the status endpoint.
Status response fields
Unique task identifier.
Current task state:
pending, processing, success, or failed.JSON string containing generated video URLs. Present when
state is success.Machine-readable failure code. Present when
state is failed.Human-readable failure message. Present when
state is failed.Task creation timestamp in Unix milliseconds.
Task completion timestamp in Unix milliseconds. Present after completion.
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.Billing
Sora 2 is billed by generated video duration. The current public APIXO price on the pricing page is$0.09 / second.
| Duration | APIXO price |
|---|---|
4 seconds | $0.36 / video |
8 seconds | $0.72 / video |
12 seconds | $1.08 / video |
Latency and polling
Actual latency may vary by prompt complexity, selected route, input image availability, and current queue load.| Duration | Typical generation time | Recommended first poll | Poll interval |
|---|---|---|---|
4 seconds | 2-4 minutes | 120s after task creation | 10s |
8 seconds | 3-5 minutes | 180s after task creation | 10s |
12 seconds | 4-6 minutes | 180s after task creation | 10s |
429, slow down requests and retry with backoff. For account-level details, see System APIs.
Errors and troubleshooting
HTTP errors
| Code | Meaning | What to do |
|---|---|---|
400 | Invalid request body, mode, parameter, prompt, or image URL shape | Fix the request before retrying |
401 | Missing or invalid API key | Check the Authorization header |
402 | Insufficient balance or quota | Add balance before retrying |
403 | Key or route cannot access the model | Check permissions and route strategy |
429 | Rate limit or concurrency limit reached | Retry with exponential backoff |
500 | Server error or unmapped upstream failure | Retry with backoff |
502 | Upstream service error | Retry with backoff |
504 | Upstream timeout | Retry or use callback mode for long-running jobs |
Task failure codes
Failure codes can vary by selected route. Common values include:| Fail code | Meaning | What to do |
|---|---|---|
PromptInvalid | Prompt was rejected or malformed | Rewrite the prompt and retry |
SensitiveContent | Prompt or media failed safety checks | Change the prompt or input image |
SensitiveContentDetected | Upstream flagged generated or input content | Change the prompt or input image |
InputImageSensitiveContentDetected | Reference image failed safety checks | Use a different public image URL |
ImageFormatIncorrect | Reference image format could not be processed | Use a direct JPG, PNG, or WebP image URL |
InvalidImageSize | Reference image dimensions or size are invalid | Resize or compress the image |
RateLimited | Upstream route was rate limited | Retry with exponential backoff |
Timeout | Generation did not finish in time | Retry, reduce prompt complexity, or use callback mode |
Unknown error | Upstream returned an unmapped failure | Retry with backoff or contact support with the taskId |