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.

Overview

Wan 2.5 generates short videos from a text prompt or from one reference image plus a prompt.
CapabilityValue
Model IDwan-2-5-video
Modestext-to-video, image-to-video
PromptMax 1500 characters (text-to-video required and non-empty, image-to-video optional)
Negative promptOptional, max 500 characters
Reference imagesimage-to-video requires exactly 1 URL; JPEG/JPG/PNG(no alpha)/BMP/WEBP, width and height 240-8000 px, file size <=20MB
Audio inputaudio_urls optional with exactly 1 URL; wav/mp3, 3-30s, file size <=15MB
Resolutions480p, 720p, 1080p
Duration5 or 10 seconds
Text-to-video aspect ratios16:9, 9:16, 1:1 (all resolutions), plus 4:3, 3:4 for 720p/1080p

Endpoint and authentication

Base URL:
https://api.apixo.ai/api/v1
MethodEndpointPurpose
POST/generateTask/wan-2-5-videoSubmit a generation task
GET/statusTask/wan-2-5-video?taskId={taskId}Poll task status and retrieve results
All requests require your APIXO API key:
Authorization: Bearer YOUR_API_KEY
Submit requests also require:
Content-Type: application/json

Copy-paste async quickstart

curl -X POST "https://api.apixo.ai/api/v1/generateTask/wan-2-5-video" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "input": {
      "mode": "text-to-video",
      "prompt": "a cinematic shot of clouds drifting over a quiet mountain lake",
      "audio_urls": [
        "https://example.com/music.mp3"
      ],
      "resolution": "720p",
      "duration": 5,
      "aspect_ratio": "16:9"
    }
  }'
Successful response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678"
  }
}
Save the taskId; you need it to poll for the final result.

Poll for result

curl -X GET "https://api.apixo.ai/api/v1/statusTask/wan-2-5-video?taskId=task_12345678" \
  -H "Authorization: Bearer YOUR_API_KEY"
Processing response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "processing",
    "createTime": 1767965610929
  }
}
Success response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "success",
    "resultJson": "{\"resultUrls\":[\"https://file.apixo.ai/video.mp4\"]}",
    "createTime": 1767965610929,
    "completeTime": 1767965752317,
    "costTime": 141388
  }
}
Failed response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "failed",
    "failCode": "INVALID_PARAMETER",
    "failMsg": "The parameter {{resolution}} is invalid",
    "createTime": 1767965610929,
    "completeTime": 1767965620132
  }
}
Parse resultJson after state becomes success:
const payload = JSON.parse(data.resultJson);
const videoUrls = payload.resultUrls;

Request body

Text-to-video

{
  "request_type": "async",
  "input": {
    "mode": "text-to-video",
    "prompt": "a serene mountain landscape with moving clouds and gentle breeze",
    "audio_urls": [
      "https://example.com/music.mp3"
    ],
    "resolution": "480p",
    "duration": 5,
    "aspect_ratio": "1:1",
    "negative_prompt": "low quality, blurry",
    "watermark": false,
    "seed": 20260413
  }
}

Image-to-video

{
  "request_type": "callback",
  "callback_url": "https://your-server.com/webhooks/apixo",
  "input": {
    "mode": "image-to-video",
    "image_urls": [
      "https://example.com/reference.png"
    ],
    "prompt": "turn this photo into a smooth cinematic shot with a slow push-in camera move",
    "audio_urls": [
      "https://example.com/music.mp3"
    ],
    "resolution": "1080p",
    "duration": 10
  }
}

Parameters

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

Response format

Submit task response

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

Status response fields

taskId
string
Unique task identifier.
state
string
Current task state: pending, processing, success, or failed.
resultJson
string
JSON string containing the generated video URLs. Present when state is success.
failCode
string
Machine-readable failure code. Present when state is failed.
failMsg
string
Human-readable failure message. Present when state is failed.
createTime
integer
Task creation timestamp in Unix milliseconds.
completeTime
integer
Task completion timestamp in Unix milliseconds. Present after completion.
costTime
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.
curl -X POST "https://api.apixo.ai/api/v1/generateTask/wan-2-5-video" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "callback",
    "callback_url": "https://your-server.com/webhooks/apixo",
    "input": {
      "mode": "text-to-video",
      "prompt": "a polished product demo video with gentle camera movement",
      "resolution": "720p",
      "duration": 5,
      "aspect_ratio": "16:9"
    }
  }'
See Webhooks for delivery requirements and retry behavior.

Billing

Wan 2.5 is billed per generated second.
ModeResolutionUnit price
text-to-video480p$0.05 / second
text-to-video720p$0.10 / second
text-to-video1080p$0.15 / second
image-to-video480p$0.05 / second
image-to-video720p$0.10 / second
image-to-video1080p$0.15 / second
Final cost formula:
total_cost = duration_seconds * resolution_unit_price
For current route and market comparison pricing, see Pricing.

Latency and polling

Video generation is long-running. Actual latency may vary by prompt complexity, mode, selected resolution, and current queue load.
Request shapeTypical generation timeRecommended first pollPoll interval
480p40s-120s40s after task creation10s
720p60s-180s60s after task creation10s
1080p90s-250s90s after task creation10s
For high-concurrency production workloads, use callback mode to avoid frequent polling.
Practical notes:
  • Use aspect_ratio only with text-to-video.
  • audio_urls supports one MP3/WAV URL with max 15 MB; recommended duration range is 3-30 seconds.
  • For image-to-video, image_urls must contain exactly one image URL and the image file should be at most 20 MB.
  • Result URLs are temporary. Download important outputs promptly.
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

CodeMeaningWhat to do
400Invalid request body, mode, parameter, or media URL shapeFix the request before retrying
401Missing or invalid API keyCheck the Authorization header
402Insufficient balance or quotaAdd balance or switch account/key
403Key or account cannot access the modelCheck account permissions
429Rate limit or concurrency limit reachedRetry with exponential backoff
500Server errorRetry with backoff
502Third-party model service errorRetry with backoff
504Third-party model timeoutRetry or use callback mode for long-running jobs

Task failure codes

Fail codeMeaningWhat to do
CONTENT_VIOLATIONPrompt or reference image failed safety checksChange the prompt or input image
INVALID_IMAGE_URLA reference image URL could not be fetched or decodedUse a public, direct media URL
INVALID_PARAMETERA model parameter is unsupported or malformedCheck mode, resolution, duration, aspect_ratio, image_urls, and audio_urls
INSUFFICIENT_BALANCEThe account does not have enough balance for the taskAdd balance before retrying
TIMEOUTGeneration did not finish in timeRetry, reduce input complexity, or use callback mode

Parameter troubleshooting

  • prompt is required for text-to-video, optional for image-to-video.
  • image_urls is required only for image-to-video and must contain exactly one URL.
  • audio_urls supports exactly one MP3/WAV URL when provided; file size should be ≤ 15 MB and recommended duration range is 3-30 seconds.
  • resolution defaults to 1080p when omitted.
  • duration defaults to 5 when omitted and only accepts 5 or 10.
  • aspect_ratio applies only to text-to-video.
See Error Codes for the full error reference.