Skip to main content
Wan
Wan uses one MixRoute video endpoint. Keep model at the root and place the provider input and parameters objects inside metadata. Model versions use different input protocols; choose the exact ID and schema below. POST https://api.mixroute.ai/v1/video/generations

Models

Model availability depends on your account’s model list. A vendor model or dated snapshot not returned by your account should not be assumed available.

Request Envelope

Authenticate with Authorization: Bearer and your MixRoute key. No Alibaba key, workspace ID, regional endpoint, or X-DashScope-Async header is needed. Do not send input/parameters at the root or flatten their contents directly into metadata.
Use metadata.input.prompt for the prompt. Compatibility fallbacks are metadata.prompt, then top-level prompt, in that order; when present, metadata.input.prompt takes precedence. Supply a prompt or valid media input, and obey the selected model’s own required-input rules. Native fields are forwarded without renaming. New provider fields may be supplied in their original input/parameters location; the upstream service validates model-specific combinations. This does not make a field supported by every model.

Wan 3.0

Media Types

  • Frame mode (first_frame/last_frame) is mutually exclusive with reference_*, file, and link. Unlike Wan 2.7 I2V, Wan 3.0 frame mode cannot include driving audio.
  • Reference images, videos, and audio may be combined. file and link are mutually exclusive, but either may accompany reference_* media. Respect every per-type limit and the overall limit of 20 media items.
  • Refer to media by type-specific order: Image 1, Video 1, Audio 1, or 图1、视频1、音频1.
  • Editing/extension require reference_video and a matching prompt. Use ratio=adaptive for extension; for editing, adaptive and duration=-1 preserve source framing and let the model choose the duration. Input video time plus output time must still fit within 30 seconds.
Wan 3.0 does not use size, negative_prompt, template, img_url, first_frame_url, last_frame_url, or audio_url. The gateway removes legacy fields and can convert audio_url to a reference_audio item. New requests should use input.media directly.

Wan 2.7

Input Modes

For I2V continuation with first_clip, duration controls the final total length including the source clip, not just the added seconds. For R2V, use Image 1 / Video 1 references, counting images and videos separately. Wan 2.7 uses resolution/ratio rather than the Wan 2.6 T2V/R2V size field; shot_type is no longer used. I2V output follows the source aspect ratio and omits ratio.

Wan 2.6

T2V / R2V Sizes

Wan 2.6 R2V uses character1, character2, etc., in reference_urls order, rather than the Wan 2.7 Image/Video labels. Its references require public HTTP/HTTPS or accessible OSS URLs. The standard 2.6 models listed here do not expose the audio=false switch of the separate Flash variants. Legacy effect templates are not a common capability of these eight models.

Media Constraints

Use public URLs for portable requests. OSS temporary links and provider asset IDs are scoped to the upstream account/region and must be accessible to the selected channel. Do not send your MixRoute key when fetching a third-party CDN result URL.

Request Examples

Set MIXROUTE_API_KEY and replace example.com media URLs with accessible source files. Each POST creates a separate task; do not automatically repeat a timed-out submission.

Wan 3.0 Video

Wan 2.7 T2V

Wan 2.7 I2V

Wan 2.7 R2V

Wan 2.7 VideoEdit

Wan 2.6 T2V

Wan 2.6 I2V

Wan 2.6 R2V

First and Last Frames

File Input Without a Prompt

Responses and Polling

Submission returns a MixRoute task_id (and id alias). This is not the upstream task ID.
GET https://api.mixroute.ai/v1/video/generations/{task_id}
Read result_url only after SUCCESS. On failure the gateway may place the failure text in result_url, so it is not necessarily a URL. The code=“success” envelope only means the query succeeded, not that the generation succeeded.
The complete upstream result is retained at data.data; read usage and request_id there. UNKNOWN means the upstream task is missing or expired, not necessarily a generation error. Poll about every 15 seconds and back off on rate limits/transient errors. Upstream task lookup and result links have limited retention, typically 24 hours; save completed output promptly.

Python Workflow

Use the console bill for final charges. Submission can reserve quota before completion; request estimates and final settlement may differ. Do not treat input/negative/zero duration values as a way to obtain a zero-cost task.