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.7 is an Alibaba video model for text-to-video, image-to-video, reference-guided generation, and video editing. Use this page when you are ready to call the API after trying the model in the APIXO playground.| Capability | Value |
|---|---|
| Model ID | wan-2-7-video |
| Modes | text-to-video, image-to-video, reference-to-video, video-edit |
| Prompt | Required for text-to-video and reference-to-video; optional for image-to-video and video-edit |
| Resolutions | 720p, 1080p |
| Aspect ratios | 16:9, 9:16, 1:1, 4:3, 3:4 |
| Mode-specific ratio rules | Default 16:9 for text-to-video and reference-to-video; not supported for image-to-video; optional for video-edit |
| Duration | text-to-video/image-to-video: 2-15 (default 5); reference-to-video: 2-15 or 2-10 when any reference video is used (default 5); video-edit: 0 or 2-10 (default 0) |
| Public media fields | image_urls, video_urls, audio_urls |
Public input contract
- Public media input fields are
image_urls,video_urls, andaudio_urls. - Use
audio_urls(notaudio_url) for audio input.
Endpoint and authentication
Base URL:| Method | Endpoint | Purpose |
|---|---|---|
POST | /generateTask/wan-2-7-video | Submit a generation or edit task |
GET | /statusTask/wan-2-7-video?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 (first and optional last frame)
Reference-to-video
Video-edit
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.7 input parameters.
Response format
Submit task response
POST /generateTask/wan-2-7-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 generated video URLs in
resultUrls. 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 completion when upstream timing is available.
Webhook callback mode
Use callback mode when your backend should receive the final result automatically instead of polling.Billing
Wan 2.7 is billed per second. The selectedresolution determines the unit price.
| Resolution | APIXO official price |
|---|---|
720p | $0.08 / second |
1080p | $0.12 / second |
| Mode | Formula |
|---|---|
text-to-video | duration * unitPrice |
image-to-video | duration * unitPrice |
reference-to-video | duration * unitPrice |
video-edit | billableSeconds * unitPrice |
video-edit, billing is based on both input and output duration:
- Input video duration must be greater than
0and less than11seconds. - Billable input duration is capped at
10seconds. - If
duration = 0, thenbillableSeconds = cappedInputDuration * 2. - If
duration = 2-10, thenbillableSeconds = cappedInputDuration + duration. - Maximum billable seconds for
video-editis20.
Latency and polling
Wan 2.7 tasks are asynchronous. The backend does not provide a fixed public latency SLA; actual latency varies by mode, resolution, duration, prompt complexity, media fetch speed, and provider queue load.| Workflow | Recommended first poll | Poll interval |
|---|---|---|
text-to-video | 30s after task creation | 10s |
image-to-video | 30s after task creation | 10s |
reference-to-video | 30s-45s after task creation | 10s-15s |
video-edit | 45s-60s after task creation | 10s-15s |
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 route cannot access the model | Check permissions and route strategy |
429 | Rate limit or concurrency limit reached | Retry with exponential backoff |
500 | Server error | Retry with backoff |
502 | Upstream provider error | Retry with backoff |
504 | Upstream timeout | Retry or use callback mode |
Task failure codes
failCode is route-dependent and may come from mapped upstream failures. Common values include:
| Fail code | Meaning | What to do |
|---|---|---|
PromptInvalid | Prompt is invalid or rejected by provider | Rewrite prompt and retry |
MissingParameter / BadRequest | Required fields are missing or malformed | Check mode-specific required fields |
SensitiveContent / SensitiveContentDetected | Prompt or media failed safety checks | Change prompt or media |
RateLimitExceeded | Provider or route rate limit was reached | Retry with backoff |
Task TimeOut / Timeout | Upstream generation timed out | Retry or use callback mode |
UnmappedUpstreamError | Upstream error could not be mapped to a known type | Retry with backoff or contact support with taskId |
Parameter troubleshooting
modemust be one oftext-to-video,image-to-video,reference-to-video,video-edit.promptis required fortext-to-videoandreference-to-video.ratiois not allowed inimage-to-video.image-to-videorequiresimage_urlsorvideo_urls.- If
image-to-videoincludesvideo_urls,audio_urlsis not allowed. reference-to-videorequires at least one reference item acrossimage_urlsandvideo_urls, with total count<= 5.- If
reference-to-videoincludesaudio_urls, its length must equalimage_urls + video_urls. video-editrequires exactly onevideo_urlsitem.video-editinput clip duration must be greater than0and less than11seconds.