Skip to main content

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.

What this model is for

Use this page after trying Sora 2 Pro in the APIXO playground. It shows the model ID, request body, result format, and the shared async workflow links you need for API integration.

Model ID, endpoint, and auth

  • Model ID: sora-2-pro
  • Base URL: https://api.apixo.ai/api/v1
MethodEndpointDescription
POST/api/v1/generateTask/sora-2-proCreate generation task
GET/api/v1/statusTask/sora-2-proQuery task status

Authentication

All requests require an API Key in the header:
Authorization: Bearer YOUR_API_KEY

Request Body

{
  "request_type": "async",
  "callback_url": "https://...",
  "provider": "official",
  "input": {
    "mode": "text-to-video",
    "prompt": "...",
    "duration": 8,
    "size": "720*1280"
  }
}

Parameters

request_type
string
default:"async"
async (polling) or callback (webhook)
callback_url
string
Callback URL, required when request_type=callback (conditional)
provider
string
default:"official"
Routing strategy. Only official is supported; always set provider=official explicitly.
input
object
required
Model input parameters
Mode Options:
  • text-to-video — Generate video from text prompt
  • image-to-video — Generate video from reference image

Copy-paste quickstart

Text-to-Video
curl -X POST "https://api.apixo.ai/api/v1/generateTask/sora-2-pro" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "provider": "official",
    "input": {
      "mode": "text-to-video",
      "prompt": "a cinematic tracking shot of a futuristic city with flying cars",
      "duration": 8,
      "size": "1280*720"
    }
  }'
Image-to-Video
curl -X POST "https://api.apixo.ai/api/v1/generateTask/sora-2-pro" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "callback",
    "callback_url": "https://your-server.com/callback",
    "provider": "official",
    "input": {
      "mode": "image-to-video",
      "prompt": "make this image come alive with subtle motion",
      "duration": 12,
      "resolution": "1080p",
      "image_urls": [
        "https://example.com/reference_image.jpg"
      ]
    }
  }'

Response and result format

POST /api/v1/generateTask/sora-2-pro

Returns taskId on success for subsequent status queries. Success:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678"
  }
}
Error:
{
  "code": 400,
  "message": "Insufficient credits",
  "data": null
}
{
  "code": 400,
  "message": "Content violates provider policy, please adjust the prompt",
  "data": null
}

GET /api/v1/statusTask/sora-2-pro

Query task execution status and results via taskId.
curl -X GET "https://api.apixo.ai/api/v1/statusTask/sora-2-pro?taskId=task_12345678" \
  -H "Authorization: Bearer YOUR_API_KEY"
Success:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "success",
    "resultJson": "{\"resultUrls\":[\"https://r2.apixo.ai/video.mp4\"]}",
    "createTime": 1767965610929,
    "completeTime": 1767965730929,
    "costTime": 120000
  }
}
Failed:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "failed",
    "failCode": "CONTENT_VIOLATION",
    "failMsg": "Content does not meet safety guidelines"
  }
}

Polling result fields

taskId
string
Unique task identifier.
state
string
Current task state: pending, processing, success, or failed.
resultJson
string
JSON string containing resultUrls array. Only present on success. Parse with JSON.parse().
failCode
string
Error code. Only present when state is failed. See Error Codes.
failMsg
string
Human-readable error message. Only present when state is failed.
createTime
integer
Task creation timestamp (Unix milliseconds).
completeTime
integer
Task completion timestamp (Unix milliseconds).
costTime
integer
Processing duration in milliseconds.

Polling and webhook result retrieval

Use request_type: "async" with the status endpoint when your app wants to poll for completion. Use request_type: "callback" with callback_url when your production service should receive the final result automatically. See Webhooks for delivery details.

Common errors

CodeDescription
400Invalid parameters or request error
401Invalid or missing API Key
429Rate limit exceeded
Fail CodeDescription
CONTENT_VIOLATIONContent violates safety guidelines
INVALID_IMAGE_URLCannot access provided image URL

Rate Limits

LimitValue
Requests60 / minute
Concurrent tasks10
Exceeding limits returns 429 error. Wait and retry.

Tips

  • Generation time: Average ~3 minutes per video. Submit task, wait 120 seconds, then poll every 5 seconds.
  • Routing recommendation: Always include provider=official explicitly in request body.
  • Callback mode: Due to long generation times, strongly recommend using callback mode.
  • Video expiration: Result URLs are valid for 15 days. Download promptly.
  • Content moderation: Prompts must comply with content safety guidelines. Violations return CONTENT_VIOLATION.
  • Image formats: image_urls supports JPG, PNG, WebP, max 10MB per image.
  • Duration options: Use 4, 8, or 12 seconds depending on preview vs final output needs.
  • Official route duration policy: Under provider=official, duration values should be explicitly set to 4, 8, or 12.
  • Size vs Resolution:
    • size is used in text-to-video mode: 720*1280 (portrait), 1280*720 (landscape), 1024*1792, 1792*1024
    • resolution is used in image-to-video mode: 720p or 1080p

Video generation takes longer than images — use callback mode for production workloads. Result URLs expire after 15 days; download important outputs promptly.