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.| Capability | Value |
|---|---|
| Model ID | wan-2-5-video |
| Modes | text-to-video, image-to-video |
| Prompt | Max 1500 characters (text-to-video required and non-empty, image-to-video optional) |
| Negative prompt | Optional, max 500 characters |
| Reference images | image-to-video requires exactly 1 URL; JPEG/JPG/PNG(no alpha)/BMP/WEBP, width and height 240-8000 px, file size <=20MB |
| Audio input | audio_urls optional with exactly 1 URL; wav/mp3, 3-30s, file size <=15MB |
| Resolutions | 480p, 720p, 1080p |
| Duration | 5 or 10 seconds |
| Text-to-video aspect ratios | 16:9, 9:16, 1:1 (all resolutions), plus 4:3, 3:4 for 720p/1080p |
Endpoint and authentication
Base URL:| Method | Endpoint | Purpose |
|---|---|---|
POST | /generateTask/wan-2-5-video | Submit a generation task |
GET | /statusTask/wan-2-5-video?taskId={taskId} | Poll task status and retrieve results |
Copy-paste async quickstart
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.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:
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 the 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
Wan 2.5 is billed per generated second.| Mode | Resolution | Unit price |
|---|---|---|
text-to-video | 480p | $0.05 / second |
text-to-video | 720p | $0.10 / second |
text-to-video | 1080p | $0.15 / second |
image-to-video | 480p | $0.05 / second |
image-to-video | 720p | $0.10 / second |
image-to-video | 1080p | $0.15 / second |
Latency and polling
Video generation is long-running. Actual latency may vary by prompt complexity, mode, selected resolution, and current queue load.| Request shape | Typical generation time | Recommended first poll | Poll interval |
|---|---|---|---|
480p | 40s-120s | 40s after task creation | 10s |
720p | 60s-180s | 60s after task creation | 10s |
1080p | 90s-250s | 90s after task creation | 10s |
- Use
aspect_ratioonly withtext-to-video. audio_urlssupports one MP3/WAV URL with max 15 MB; recommended duration range is 3-30 seconds.- For
image-to-video,image_urlsmust contain exactly one image URL and the image file should be at most 20 MB. - Result URLs are temporary. Download important outputs promptly.
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, or media URL shape | Fix the request before retrying |
401 | Missing or invalid API key | Check the Authorization header |
402 | Insufficient balance or quota | Add balance or switch account/key |
403 | Key or account cannot access the model | Check account permissions |
429 | Rate limit or concurrency limit reached | Retry with exponential backoff |
500 | Server error | Retry with backoff |
502 | Third-party model service error | Retry with backoff |
504 | Third-party model timeout | Retry or use callback mode for long-running jobs |
Task failure codes
| Fail code | Meaning | What to do |
|---|---|---|
CONTENT_VIOLATION | Prompt or reference image failed safety checks | Change the prompt or input image |
INVALID_IMAGE_URL | A reference image URL could not be fetched or decoded | Use a public, direct media URL |
INVALID_PARAMETER | A model parameter is unsupported or malformed | Check mode, resolution, duration, aspect_ratio, image_urls, and audio_urls |
INSUFFICIENT_BALANCE | The account does not have enough balance for the task | Add balance before retrying |
TIMEOUT | Generation did not finish in time | Retry, reduce input complexity, or use callback mode |
Parameter troubleshooting
promptis required fortext-to-video, optional forimage-to-video.image_urlsis required only forimage-to-videoand must contain exactly one URL.audio_urlssupports exactly one MP3/WAV URL when provided; file size should be ≤ 15 MB and recommended duration range is 3-30 seconds.resolutiondefaults to1080pwhen omitted.durationdefaults to5when omitted and only accepts5or10.aspect_ratioapplies only totext-to-video.