Skip to main content

Overview

Wan 2.7 Video 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.

Public input contract

  • Public media input fields are image_urls, video_urls, and audio_urls.
  • Use audio_urls for audio input.
  • For reference-to-video, audio_urls aligns by slot order: first image_urls, then video_urls.
  • For reference-to-video, use empty string "" in audio_urls to skip a specific reference slot without shifting later audio bindings.

Endpoint and authentication

Base URL:
All requests require your APIXO API key:
Submit requests also require:

Copy-paste async quickstart

This minimal request submits a text-to-video task and returns a taskId.
Successful response:
Save the taskId; you need it to poll for the final result.

Poll for result

Processing response:
Success response:
Failed response:
Parse resultJson after state becomes success:

Request body

Text-to-video

Image-to-video (first and optional last frame)

Reference-to-video

Video-edit

Parameters

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

Response format

Submit task response

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

Status response fields

string
Unique task identifier.
string
Current task state: pending, processing, success, or failed.
string
JSON string containing generated video URLs in resultUrls. Present when state is success.
string
Machine-readable failure code. Present when state is failed.
string
Human-readable failure message. Present when state is failed.
integer
Task creation timestamp in Unix milliseconds.
integer
Task completion timestamp in Unix milliseconds. Present after completion.
integer
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.
See Webhooks for delivery requirements and retry behavior.

Billing

Wan 2.7 Video is billed per second. Unit price depends on both mode and resolution. Billing formulas: For video-edit, billing is based on both input and output duration:
  • Input video duration must be between 2 and 10 seconds (inclusive).
  • Billable input duration is capped at 10 seconds.
  • If duration = 0, then billableSeconds = cappedInputDuration * 2.
  • If duration = 2-10, then billableSeconds = cappedInputDuration + duration.
  • Maximum billable seconds for video-edit is 20.
For current route and market comparison pricing, see Pricing.

Latency and polling

Wan 2.7 Video 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.
For production workloads, use callback mode to avoid frequent polling on long-running video jobs.
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

Task failure codes

failCode is route-dependent and may come from mapped upstream failures. Common values include:

Parameter troubleshooting

  • mode must be one of text-to-video, image-to-video, reference-to-video, video-edit.
  • prompt is required for text-to-video, reference-to-video, and video-edit.
  • ratio is not allowed in image-to-video.
  • image-to-video requires image_urls or video_urls.
  • If image-to-video includes video_urls, audio_urls is not allowed.
  • reference-to-video requires at least one reference item across image_urls and video_urls, with total count <= 5.
  • If reference-to-video includes audio_urls, it binds by slot order: image_urls first, then video_urls.
  • If reference-to-video needs to skip a reference slot while keeping later audio aligned, pass empty string "" in that slot.
  • If reference-to-video includes audio_urls, its length cannot exceed image_urls + video_urls.
  • video-edit requires exactly one video_urls item.
  • video-edit requires a non-empty prompt.
  • video-edit input clip duration must be 2-10 seconds.
See Error Codes for the full error reference.