Wan 2.6 T2V Spark
alibaba/wan2.6-t2v-spark — a video model by Alibaba. The full parameter schema is reproduced in full below.
| Catalog slug | alibaba/wan2.6-t2v-spark |
| Kind | video |
| Vendor | Alibaba |
How to call
Section titled “How to call”Video generation is asynchronous (create → poll → result). Address it by its catalog slug through the standard video door — the gateway resolves the slug and routes it internally; the inference route is never exposed.
Through the Sociaro SDK / POST /v1/videos door
Section titled “Through the Sociaro SDK / POST /v1/videos door”The SDK’s video.generate drives the whole cycle and blocks until a terminal state:
from sociaro_ai import Sociaro
client = Sociaro(api_key="gw_live_...")
result = client.video.generate( model="alibaba/wan2.6-t2v-spark", prompt="a timelapse of a blooming flower",)print(result.url)Additional parameters (duration, size/resolution, etc.) are forwarded to the upstream as-is — use the exact field name and value format from the schema below. In particular the legacy size for this model is a width*height string such as 1280*720 (an asterisk, not a tier or x).
For a non-blocking handle use job = client.video.submit(model="alibaba/wan2.6-t2v-spark", …) then job.result(). Raw door: POST https://api.sociaro.com/v1/videos (create), then poll GET /v1/videos/{id} — see async jobs and media doors.
Parameters — full schema
Section titled “Parameters — full schema”The complete, one-to-one API schema for this model, transcribed from the official source. Nothing omitted. Examples in the schema may use a representative model of the family — for this model use the slug alibaba/wan2.6-t2v-spark as shown in How to call above.
COVERAGE MAP — which official page documents each requested gateway slug
Section titled “COVERAGE MAP — which official page documents each requested gateway slug”| gateway slug | documented on page | task family | endpoint | request body style |
|---|---|---|---|---|
happyhorse-1.0-t2v | happyhorse-text-to-video-api-reference | text-to-video | video-generation/video-synthesis | input.prompt + parameters |
happyhorse-1.0-i2v | happyhorse-image-to-video-api-reference | image-to-video (first frame) | video-generation/video-synthesis | input.prompt + input.media[] (first_frame) |
happyhorse-1.0-r2v | happyhorse-reference-to-video-api-reference | reference-to-video (multi-image) | video-generation/video-synthesis | input.prompt + input.media[] (reference_image 1–9) |
happyhorse-1.0-video-edit | happyhorse-video-edit-api-reference | video editing | video-generation/video-synthesis | input.prompt + input.media[] (video + reference_image 0–5) |
wan2.2-animate-mix | wan-animate-mix-api | video character swap | image2video/video-synthesis | flat input.image_url + input.video_url; parameters.mode |
wan2.2-animate-move | wan-animate-move-api | video motion transfer | image2video/video-synthesis | flat input.image_url + input.video_url; parameters.mode |
wan2.2-kf2v-flash | legacy-image-to-video-by-first-and-last-frame-api-reference | keyframe (first+last frame) | image2video/video-synthesis | flat input.first_frame_url + input.last_frame_url |
wan2.6-i2v | legacy-image-to-video-api-reference | image-to-video (first frame, LEGACY) | video-generation/video-synthesis | flat input.img_url (+ audio_url); parameters.shot_type |
wan2.6-i2v-flash | legacy-image-to-video-api-reference | image-to-video (first frame, LEGACY) | video-generation/video-synthesis | flat input.img_url (+ audio_url); parameters.shot_type, parameters.audio |
wan2.6-r2v | use-video-generation (capability matrix) | reference-to-video | video-generation/video-synthesis | media[]-style reference-to-video; request-parameter contract not published in a dedicated API reference |
wan2.6-r2v-flash | use-video-generation (capability matrix) | reference-to-video | video-generation/video-synthesis | media[]-style reference-to-video; request-parameter contract not published in a dedicated API reference |
wan2.6-t2v | text-to-video-api-reference (LEGACY protocol section) | text-to-video | video-generation/video-synthesis | input.prompt (+ audio_url); parameters.size, shot_type |
wan2.7-i2v | image-to-video-general-api-reference | image-to-video (1st frame / 1st+last / continuation) | video-generation/video-synthesis | input.prompt + input.media[] (first_frame/last_frame/driving_audio/first_clip) |
wan2.7-r2v | wan-video-to-video-api-reference | reference-to-video | video-generation/video-synthesis | input.prompt + input.media[] (reference_image/reference_video/first_frame + reference_voice) |
wan2.7-t2v | text-to-video-api-reference (NEW protocol section) | text-to-video | video-generation/video-synthesis | input.prompt (+ audio_url); parameters.resolution/ratio |
wan2.7-videoedit | wan-video-editing-api-reference | video editing | video-generation/video-synthesis | input.prompt + input.media[] (video + reference_image 0–4); audio_setting |
Slug naming: the gateway slug is wan2.7-videoedit (no hyphen between video & edit), matching the DashScope model id wan2.7-videoedit. The HappyHorse edit slug is happyhorse-1.0-video-edit (hyphenated). These conventions differ and are not normalized.
The wan2.7-i2v model id appears in dated form wan2.7-i2v-2026-04-25 in examples; the un-dated wan2.7-i2v alias is also accepted.
CRITICAL PER-MODEL / PER-SUB-FAMILY DIFFERENCES (do not mix parameter sets)
Section titled “CRITICAL PER-MODEL / PER-SUB-FAMILY DIFFERENCES (do not mix parameter sets)”-
TWO endpoints, NOT one. Most families post to
POST .../api/v1/services/aigc/video-generation/video-synthesis, but the animate family (wan2.2-animate-move,wan2.2-animate-mix) AND the keyframe family (wan2.2-kf2v-flash,wan2.1-kf2v-plus) post to a DIFFERENT path:POST .../api/v1/services/aigc/image2video/video-synthesis. All poll via the SAMEGET .../api/v1/tasks/{task_id}. -
THREE request-body styles under
input:- media[] array (NEW protocol): wan2.7-i2v, wan2.7-r2v, wan2.7-videoedit, all 4 HappyHorse models.
Each element
{ "type": ..., "url": ... }(+ optionalreference_voiceon wan2.7-r2v). - flat scalar URLs (LEGACY i2v): wan2.6-i2v / wan2.6-i2v-flash use
input.img_url(+audio_url). - flat scalar URLs (animate / kf2v):
input.image_url+input.video_url(animate) orinput.first_frame_url+input.last_frame_url(kf2v). - prompt-only
input(t2v): wan2.7-t2v, wan2.6-t2v, happyhorse-1.0-t2v (+ optionalaudio_url).
- media[] array (NEW protocol): wan2.7-i2v, wan2.7-r2v, wan2.7-videoedit, all 4 HappyHorse models.
Each element
-
parameters.size(legacy) vsparameters.resolution+ratio(new).- LEGACY t2v (wan2.6/2.5/2.2/2.1) and LEGACY i2v use
size= explicitwidth*heightstring (e.g.1280*720). - NEW t2v (wan2.7), i2v, r2v, videoedit, and ALL HappyHorse use
resolution(tier720P/1080P/480P) +ratio(where applicable). - kf2v uses
resolution(tier). animate uses neither (output follows input; onlymode).
- LEGACY t2v (wan2.6/2.5/2.2/2.1) and LEGACY i2v use
-
resolutionallowed tiers & defaults differ:- wan2.7-t2v / wan2.7-i2v / wan2.7-r2v / wan2.7-videoedit:
720P,1080P— default1080P(i2v/r2v/videoedit) / default1080P(t2v). - wan2.6-i2v / wan2.6-i2v-flash:
720P,1080P— default1080P. - wan2.6-t2v (size-based): all 720p & 1080p resolutions; default
1920*1080. - wan2.6-r2v / wan2.6-r2v-flash:
720P,1080P. - wan2.2-kf2v-flash:
480P,720P,1080P— default720P; wan2.1-kf2v-plus:720Ponly. - happyhorse-1.0-t2v / -i2v / -r2v / -video-edit:
720P,1080P— default1080P. - animate-move / animate-mix: NO resolution param (
modewan-std/wan-pro controls quality tier).
- wan2.7-t2v / wan2.7-i2v / wan2.7-r2v / wan2.7-videoedit:
-
ratioparameter presence & enum:- wan2.7-t2v / wan2.7-r2v / wan2.7-videoedit:
16:9(default),9:16,1:1,4:3,3:4(5 values). - wan2.7-i2v: NO
ratio(output aspect follows the input first_frame / first_clip). - happyhorse-1.0-t2v / -r2v: EXTENDED enum
16:9(default),9:16,1:1,4:3,3:4,4:5,5:4,9:21,21:9(9 values). - happyhorse-1.0-i2v: NO
ratio(follows input image). - r2v
ratiois ignored if afirst_frameis provided (wan2.7-r2v) — output then follows the first frame.
- wan2.7-t2v / wan2.7-r2v / wan2.7-videoedit:
-
durationrange / fixed-value differs:- wan2.7-t2v / wan2.7-i2v: integer 2–15, default 5.
- wan2.7-r2v: default 5; 2–10 if reference material includes a video, 2–15 if not.
- wan2.7-videoedit: integer 2–10, default 0 (= keep input duration; nonzero truncates from 0s).
- wan2.6-t2v: integer 2–15, default 5. (wan2.5-t2v-preview 5/10; wan2.2/2.1-t2v fixed 5.)
- wan2.6-i2v / wan2.6-i2v-flash: integer 2–15, default 5. (wan2.6-i2v-us: 5/10/15; wan2.5-i2v 5/10; wan2.2-i2v fixed 5; wan2.1-i2v-turbo 3/4/5.)
- wan2.6-r2v / -flash: integer 2–10.
- wan2.2-kf2v-flash / wan2.1-kf2v-plus: fixed 5 (no other value).
- happyhorse-1.0-t2v / -i2v / -r2v: integer 3–15, default 5. happyhorse-1.0-video-edit: no duration param (output 3–15, follows input; >15s input truncated to first 15s).
- animate-move / animate-mix: no duration param (output follows reference video duration).
-
AUDIO support (input
audio_url/driving_audioAND audio output):- wan2.7-t2v: optional
input.audio_url(drives lip-sync/timing); without it the model auto-generates BGM/SFX. Audio: WAV/MP3, 2–30s, ≤15 MB. - wan2.6-t2v / wan2.5-t2v: optional
input.audio_url(wan2.6/2.5 only). wan2.2/2.1-t2v are SILENT by default (no audio). - wan2.7-i2v: optional
driving_audiomedia element (2–30s, ≤15 MB). - wan2.6-i2v / wan2.5-i2v: optional
input.audio_url(3–30s, ≤15 MB). wan2.6-i2v-flash addsparameters.audio(bool, default true) to force silent output. - wan2.7-r2v: per-entity
reference_voice(1–10s, ≤15 MB) on each media element. - wan2.6-r2v: video with audio. wan2.6-r2v-flash: video with audio or silent video.
- videoedit (wan2.7 & happyhorse):
parameters.audio_setting=auto(default) |origin(keep input video audio). - HappyHorse t2v / i2v / r2v: NO audio input/output param documented (silent video unless future).
- animate-move / animate-mix / kf2v: NO audio param.
- wan2.7-t2v: optional
-
promptrequiredness & length differ:- Required: wan2.7-t2v, wan2.6-t2v, wan2.7-r2v, wan2.7-videoedit, happyhorse-1.0-t2v, happyhorse-1.0-r2v, happyhorse-1.0-video-edit, kf2v.
- Optional: wan2.7-i2v, wan2.6-i2v (legacy), happyhorse-1.0-i2v.
- Length: wan2.7 t2v/i2v/r2v/videoedit = up to 5,000 chars. wan2.6/2.5 = 1,500 chars. wan2.2/2.1 = 800 chars. HappyHorse = 5,000 non-Chinese / 2,500 Chinese chars (any language).
- No prompt at all: animate-move / animate-mix (no
promptfield).
-
prompt_extendpresence: present (defaulttrue) on wan2.7 t2v/i2v/r2v/videoedit, wan2.6 t2v/i2v, kf2v. ABSENT on HappyHorse (all 4), animate-move, animate-mix. -
watermarkdefault differs:false(default) on ALL Wan models (text “AI Generated”; animate text “Generated by Qwen AI” on move-API, “AI Generated” on mix-API).true(default) on ALL HappyHorse models (text “HappyHorse” / “Happy Horse”). watermark is inparametersfor media-style families but ininputfor animate-move/animate-mix. -
seedis universal across every page: integer[0, 2147483647], optional, random if omitted; same seed yields only similar (not identical) output. (Not present on animate-move/animate-mix.) -
shot_type(single/multi, default single) is wan2.6-series ONLY (wan2.6-t2v, wan2.6-i2v). Effective only whenprompt_extend=true;shot_typeoverrides prompt-stated shot count. Absent everywhere else (wan2.7 controls shots via natural-language prompt; itsshot_type“has no effect”). -
animate-only
parameters:mode(REQUIRED;wan-std|wan-pro) +check_image(bool, default true). These are the ONLY two animate parameters.parametersobject is REQUIRED for animate (becausemodeis required). -
Response output shape differs between the two endpoints:
- video-generation endpoint (t2v/i2v/r2v/videoedit/kf2v/happyhorse):
output.video_urlis a top-level field underoutput. - image2video endpoint (animate-move/animate-mix):
output.results.video_urlis nested underresults.
- video-generation endpoint (t2v/i2v/r2v/videoedit/kf2v/happyhorse):
-
usageobject differs by family:- NEW media-style (wan2.7 + happyhorse t2v/i2v/r2v/videoedit):
{ duration, input_video_duration, output_video_duration, video_count, SR }(+ratiofor t2v/r2v).duration= total billed seconds = input+output. videoedit returns floats. - LEGACY t2v: wan2.6 →
{ duration, size, input_video_duration, output_video_duration, video_count, SR }; wan2.5-and-earlier →{ video_duration, video_ratio, video_count }. - LEGACY i2v:
{ input_video_duration, output_video_duration, duration, SR, video_count }. - kf2v:
{ video_duration (fixed 5), video_count, SR (2.2 only) / video_ratio (2.1 only, ="standard") }. - animate-move / animate-mix:
{ video_duration (float), video_ratio }wherevideo_ratio= service mode (standardfor wan-std,profor wan-pro).
- NEW media-style (wan2.7 + happyhorse t2v/i2v/r2v/videoedit):
-
Regions / endpoints (per-region API keys; cross-region calls FAIL):
- Singapore (recommended, workspace domain):
https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com(legacyhttps://dashscope-intl.aliyuncs.comdeprecating). - Beijing:
https://dashscope.aliyuncs.com. - US (Virginia):
https://dashscope-us.aliyuncs.com— legacy t2v/i2v (wan2.6-*-us), HappyHorse t2v/i2v/r2v/edit. - Germany (Frankfurt):
https://{WorkspaceId}.eu-central-1.maas.aliyuncs.com— legacy t2v/i2v (async-only), HappyHorse. - Region availability is per-model — animate / kf2v / new-protocol pages list only Singapore + Beijing; HappyHorse & legacy t2v/i2v add Virginia + Frankfurt.
- Singapore (recommended, workspace domain):
-
wan2.6-t2v-flashdoes NOT exist (no t2v-flash slug in catalog).-flashvariants exist for i2v (wan2.6-i2v-flash) and r2v (wan2.6-r2v-flash) only in the wan2.6 series; kf2v haswan2.2-kf2v-flash.
ENDPOINTS
Section titled “ENDPOINTS”| Operation | Method + path |
|---|---|
| Create task (video-generation families) | POST {base}/api/v1/services/aigc/video-generation/video-synthesis |
| Create task (animate + kf2v families) | POST {base}/api/v1/services/aigc/image2video/video-synthesis |
| Poll task result (ALL families) | GET {base}/api/v1/tasks/{task_id} |
{base} = one of the region hosts in difference #16.
- Auth: header
Authorization: Bearer $DASHSCOPE_API_KEY(region-specific key). Content-Type: application/json.- Async-only over HTTP: header
X-DashScope-Async: enableis REQUIRED on every Create call. Omitting it returns error"current user api does not support synchronous calls". - Two-step async: Create returns only
{ output:{ task_status:"PENDING", task_id }, request_id }. The real result (video_url,usage, actual duration/ratio/SR) appears ONLY via poll/callback. task_idvalidity: 24 hours.video_urlvalidity: 24 hours (then purged — save immediately). Video output: MP4, H.264.- Poll interval recommendation: ~15 s. State machine:
PENDING → RUNNING → SUCCEEDED | FAILED(alsoCANCELED;UNKNOWN= task not found / expired). - DashScope SDK (Python
VideoSynthesis, JavaVideoSynthesis) wraps the async flow (call / async_call / fetch / wait). Python SDK min versions: 1.23.8 (kf2v), 1.25.8 (legacy t2v), 1.25.16 (i2v/r2v/videoedit). wan2.7 is NOT supported by the Python SDK for t2v (HTTP only) per the t2v page; i2v/r2v/videoedit SDK support wan2.7.
COMMON CREATE HEADERS (all families)
Section titled “COMMON CREATE HEADERS (all families)”| Header | Type | Req | Value |
|---|---|---|---|
Content-Type | string | yes | application/json |
Authorization | string | yes | Bearer sk-xxxx |
X-DashScope-Async | string | yes | enable (Create only; HTTP is async-only) |
COMMON POLL (GET …/tasks/{task_id})
Section titled “COMMON POLL (GET …/tasks/{task_id})”- Header:
Authorization: Bearer sk-xxxx. - Path param:
task_id(string, required). - No body.
SUB-FAMILY 1 — TEXT-TO-VIDEO (t2v)
Section titled “SUB-FAMILY 1 — TEXT-TO-VIDEO (t2v)”Slugs: wan2.7-t2v (NEW protocol), wan2.6-t2v (LEGACY protocol), happyhorse-1.0-t2v.
Endpoint: video-generation/video-synthesis.
1a. wan2.7-t2v — request body
Section titled “1a. wan2.7-t2v — request body”{ "model": "wan2.7-t2v", // REQUIRED "input": { // REQUIRED "prompt": "...", // REQUIRED, ≤5000 chars (zh/en); controls shots via natural language "negative_prompt": "...", // optional, ≤500 chars "audio_url": "https://.../x.mp3" // optional; WAV/MP3, 2–30s, ≤15MB; absent ⇒ auto BGM/SFX }, "parameters": { // optional "resolution": "1080P", // optional; 720P | 1080P; default 1080P "ratio": "16:9", // optional; 16:9(def) | 9:16 | 1:1 | 4:3 | 3:4 "duration": 5, // optional; integer 2–15; default 5 "prompt_extend": true, // optional; default true "watermark": false, // optional; default false ("AI Generated") "seed": 12345 // optional; [0, 2147483647] }}Output-resolution table (wan2.7-t2v), width×height by tier×ratio:
| Tier | 16:9 | 9:16 | 1:1 | 4:3 | 3:4 |
|---|---|---|---|---|---|
| 720P | 1280×720 | 720×1280 | 960×960 | 1104×832 | 832×1104 |
| 1080P | 1920×1080 | 1080×1920 | 1440×1440 | 1648×1248 | 1248×1648 |
1b. wan2.6-t2v — request body (LEGACY)
Section titled “1b. wan2.6-t2v — request body (LEGACY)”{ "model": "wan2.6-t2v", // REQUIRED "input": { // REQUIRED "prompt": "...", // REQUIRED, ≤1500 chars (wan2.6/2.5); ≤800 (wan2.2/2.1) "negative_prompt": "...", // optional, ≤500 chars "audio_url": "https://.../x.mp3" // optional (wan2.6 & wan2.5 only); 3–30s, ≤15MB }, "parameters": { // optional "size": "1280*720", // optional; "width*height" string (NOT a tier/ratio). wan2.6-t2v default 1920*1080; valid = all 720p & 1080p "duration": 5, // optional; wan2.6-t2v integer 2–15 (def 5). wan2.6-t2v-us 5/10/15. wan2.5 5/10. wan2.2/2.1 fixed 5. "prompt_extend": true, // optional; default true "shot_type": "single", // optional (wan2.6 only); single(def) | multi; needs prompt_extend=true "watermark": false, // optional; default false "seed": 11 // optional }}LEGACY size valid resolutions (per tier):
- 480p:
832*480(16:9),480*832(9:16),624*624(1:1). - 720p:
1280*720(16:9),720*1280(9:16),960*960(1:1),1088*832(4:3),832*1088(3:4). - 1080p:
1920*1080(16:9),1080*1920(9:16),1440*1440(1:1),1632*1248(4:3),1248*1632(3:4).
1c. happyhorse-1.0-t2v — request body
Section titled “1c. happyhorse-1.0-t2v — request body”{ "model": "happyhorse-1.0-t2v", // REQUIRED "input": { "prompt": "..." }, // REQUIRED; prompt REQUIRED, ≤5000 non-zh / ≤2500 zh, any language "parameters": { // optional "resolution": "1080P", // optional; 720P | 1080P; default 1080P "ratio": "16:9", // optional; 16:9(def),9:16,1:1,4:3,3:4,4:5,5:4,9:21,21:9 (9 values) "duration": 5, // optional; integer 3–15; default 5 "watermark": true, // optional; DEFAULT TRUE ("HappyHorse") "seed": 12345 // optional }}happyhorse-1.0-t2v has NO
negative_prompt, NOprompt_extend, NOaudio_url.
SUB-FAMILY 2 — IMAGE-TO-VIDEO (i2v)
Section titled “SUB-FAMILY 2 — IMAGE-TO-VIDEO (i2v)”Slugs: wan2.7-i2v (NEW, media[]), wan2.6-i2v & wan2.6-i2v-flash (LEGACY, flat img_url), happyhorse-1.0-i2v (NEW, media[] first_frame only).
Endpoint: video-generation/video-synthesis.
2a. wan2.7-i2v — request body (NEW, media[])
Section titled “2a. wan2.7-i2v — request body (NEW, media[])”wan2.7-i2v performs THREE tasks via media[] combinations:
- first-frame-to-video:
first_frame(±driving_audio) - first-and-last-frame:
first_frame + last_frame(±driving_audio) - video continuation:
first_clip(±last_frame)
{ "model": "wan2.7-i2v", // REQUIRED (dated: wan2.7-i2v-2026-04-25) "input": { // REQUIRED "prompt": "...", // OPTIONAL, ≤5000 chars "negative_prompt": "...", // optional, ≤500 chars "media": [ // REQUIRED; each {type,url}; each type at most once { "type": "first_frame", "url": "https://.../a.png" }, { "type": "driving_audio", "url": "https://.../a.mp3" } ] }, "parameters": { // optional "resolution": "1080P", // optional; 720P | 1080P; default 1080P "duration": 5, // optional; integer 2–15; default 5 "prompt_extend": true, // optional; default true "watermark": false, // optional; default false "seed": 12345 // optional }}- NO
ratio— output aspect ratio follows the input first_frame / first_clip (may drift to nearest multiple-of-16 size). - media
typeenum:first_frame,last_frame,driving_audio,first_clip. - Valid combinations ONLY:
first_frame|first_frame+driving_audio|first_frame+last_frame|first_frame+last_frame+driving_audio|first_clip|first_clip+last_frame. - Image (first_frame/last_frame): JPEG/JPG/PNG(no alpha)/BMP/WEBP, side 240–8000 px, aspect 1:8–8:1, ≤20 MB. URL or Base64
data:{MIME};base64,{data}. - Audio (driving_audio): WAV/MP3, 2–30s, ≤15 MB.
- Video (first_clip): MP4/MOV, 2–10s, side 240–4096 px, aspect 1:8–8:1, ≤100 MB. With
first_clip,duration= max TOTAL output (e.g. duration=15 + 3s input ⇒ 12s continuation, billed 15s).
2b. wan2.6-i2v / wan2.6-i2v-flash — request body (LEGACY, flat)
Section titled “2b. wan2.6-i2v / wan2.6-i2v-flash — request body (LEGACY, flat)”{ "model": "wan2.6-i2v-flash", // REQUIRED (or wan2.6-i2v) "input": { // REQUIRED "prompt": "...", // OPTIONAL, ≤1500 chars (wan2.6/2.5); ≤800 (wan2.2/2.1) "negative_prompt": "...", // optional, ≤500 chars "img_url": "https://.../a.png", // REQUIRED; first/init frame. JPEG/JPG/PNG(no alpha)/BMP/WEBP, side 240–8000px, ≤20MB (wan2.6/2.5) / ≤10MB (wan2.2/2.1). URL or Base64. "audio_url": "https://.../a.mp3" // optional (wan2.6 & wan2.5 only); 3–30s, ≤15MB }, "parameters": { // optional "resolution": "1080P", // optional; wan2.6-i2v & -flash: 720P|1080P, default 1080P "duration": 5, // optional; wan2.6-i2v & -flash: integer 2–15, default 5 "prompt_extend": true, // optional; default true "shot_type": "single", // optional (wan2.6 series only); single(def)|multi; needs prompt_extend=true "audio": true, // optional (wan2.6-i2v-flash ONLY); true(def)=with sound, false=silent; priority audio > audio_url; affects price "watermark": false, // optional; default false "seed": 12345 // optional }}- Output aspect ratio is kept close to the input
img_urlaspect (noratio/sizefor the new-tierresolutionfield on these models — they use the tierresolution, not legacysize). - Other legacy i2v models on the same page: wan2.6-i2v-us (5/10/15), wan2.5-i2v-preview (480P/720P/1080P, 5/10), wan2.2-i2v-flash (480P/720P, fixed 5), wan2.2-i2v-plus (480P/1080P, fixed 5), wan2.1-i2v-turbo (480P/720P, 3/4/5), wan2.1-i2v-plus (720P, fixed 5).
2c. happyhorse-1.0-i2v — request body (NEW, media[] first_frame only)
Section titled “2c. happyhorse-1.0-i2v — request body (NEW, media[] first_frame only)”{ "model": "happyhorse-1.0-i2v", // REQUIRED "input": { // REQUIRED "prompt": "...", // OPTIONAL, ≤5000 non-zh / ≤2500 zh, any language "media": [ { "type": "first_frame", "url": "https://.../a.png" } ] // REQUIRED; exactly ONE first_frame }, "parameters": { // optional "resolution": "1080P", // optional; 720P | 1080P; default 1080P "duration": 5, // optional; integer 3–15; default 5 "watermark": true, // optional; DEFAULT TRUE ("Happy Horse") "seed": 12345 // optional }}- media type enum:
first_frameONLY (exactly one required). - Image: JPEG/JPG/PNG/WEBP, width & height ≥300 px, aspect 1:2.5–2.5:1, ≤20 MB. URL or Base64.
- NO
ratio(follows input image), NOnegative_prompt, NOprompt_extend, NO audio.
SUB-FAMILY 3 — REFERENCE-TO-VIDEO (r2v)
Section titled “SUB-FAMILY 3 — REFERENCE-TO-VIDEO (r2v)”Slugs: wan2.7-r2v (NEW, rich media[]), wan2.6-r2v & wan2.6-r2v-flash, happyhorse-1.0-r2v (NEW, reference_image only).
Endpoint: video-generation/video-synthesis.
3a. wan2.7-r2v — request body (NEW)
Section titled “3a. wan2.7-r2v — request body (NEW)”{ "model": "wan2.7-r2v", // REQUIRED "input": { // REQUIRED "prompt": "Image 1 ... Video 1 ...", // REQUIRED, ≤5000 chars; use "Image 1/2", "Video 1/2" identifiers (space + capital) matching media order; single ref ⇒ "the reference image/video" "negative_prompt": "...", // optional, ≤500 chars "media": [ // REQUIRED; each {type,url}(+reference_voice) { "type": "reference_image", "url": "https://.../g.jpg", "reference_voice": "https://.../v.mp3" }, { "type": "reference_video", "url": "https://.../r.mp4", "reference_voice": "https://.../b.mp3" } ] }, "parameters": { // optional "resolution": "1080P", // optional; 720P | 1080P; default 1080P "ratio": "16:9", // optional; 16:9(def),9:16,1:1,4:3,3:4 — IGNORED if a first_frame is provided (then follows first frame) "duration": 5, // optional; default 5; 2–10 if media includes a video, else 2–15 "prompt_extend": true, // optional; default true "watermark": false, // optional; default false "seed": 12345 // optional }}- media
typeenum:reference_image,reference_video,first_frame.- reference_image: subject/scene; single character if a subject. JPEG/JPG/PNG(no alpha)/BMP/WEBP, 240–8000px, 1:8–8:1, ≤20MB. URL or Base64.
- reference_video: subject + optional voice; avoid empty scenes; single character. MP4/MOV, 1–30s, 240–4096px, 1:8–8:1, ≤100MB.
- first_frame: at most 1; video starts from it; combine with subject refs.
- Asset limits: max 1
first_frame; ≥1 reference_image or reference_video; reference_images + reference_videos ≤ 5. reference_voice(optional, per element): WAV/MP3, 1–10s, ≤15MB. Voice reference only (not spoken content). Priority: explicitreference_voice> original reference_video audio.- usage adds
ratio;duration = input_video_duration + output_video_duration(billed total).
3b. wan2.6-r2v / wan2.6-r2v-flash
Section titled “3b. wan2.6-r2v / wan2.6-r2v-flash”- Capability: wan2.6-r2v generates video with audio, with single-role / multi-role generation, multi-shot narrative, and audio-video synchronization. wan2.6-r2v-flash additionally supports silent video and is faster and more cost-effective.
- Input modality: text, image, video. Resolution: 720P, 1080P. Duration: integer [2s, 10s]. 30 fps. Output: MP4 (H.264).
- Endpoint:
video-generation/video-synthesis(same async create/poll flow as the other reference-to-video models). - Alibaba Cloud does not publish a dedicated request-parameter reference for these two models; the per-field request contract is therefore not enumerated here. Use the Video generation overview for the capability matrix above. (The
wan-video-to-video-api-referencepage documents the request parameters forwan2.7-r2vonly.)
3c. happyhorse-1.0-r2v — request body (NEW)
Section titled “3c. happyhorse-1.0-r2v — request body (NEW)”{ "model": "happyhorse-1.0-r2v", // REQUIRED "input": { // REQUIRED "prompt": "... [Image 1] ... [Image 2] ...", // REQUIRED, ≤5000 non-zh/≤2500 zh; use "[Image 1]","[Image 2]" identifiers matching media order "media": [ // REQUIRED; reference_image only, 1–9 elements { "type": "reference_image", "url": "https://.../g.jpg" } ] }, "parameters": { // optional "resolution": "1080P", // optional; 720P | 1080P; default 1080P "ratio": "16:9", // optional; 16:9(def),9:16,3:4,4:3,4:5,5:4,1:1,9:21,21:9 (9 values) "duration": 5, // optional; integer 3–15; default 5 "watermark": true, // optional; DEFAULT TRUE ("Happy Horse") "seed": 12345 // optional }}- media type:
reference_imageONLY; 1–9 images. JPEG/JPG/PNG/WEBP, shortest side ≥400px (720P+ recommended), ≤20MB. URL or Base64. - Prompt syntax uses bracketed
[Image N](HappyHorse) vs un-bracketedImage N/Video N(wan2.7-r2v). - NO reference_video, NO first_frame, NO reference_voice, NO negative_prompt, NO prompt_extend, NO audio.
SUB-FAMILY 4 — VIDEO EDITING (video-edit)
Section titled “SUB-FAMILY 4 — VIDEO EDITING (video-edit)”Slugs: wan2.7-videoedit, happyhorse-1.0-video-edit.
Endpoint: video-generation/video-synthesis.
4a. wan2.7-videoedit — request body
Section titled “4a. wan2.7-videoedit — request body”{ "model": "wan2.7-videoedit", // REQUIRED "input": { // REQUIRED "prompt": "...", // REQUIRED, ≤5000 chars; instruction (edit / style transfer) "negative_prompt": "...", // optional, ≤500 chars "media": [ // REQUIRED; exactly 1 video + 0–4 reference_image { "type": "video", "url": "https://.../v.mp4" }, { "type": "reference_image", "url": "https://.../r.png" } ] }, "parameters": { // optional "resolution": "1080P", // optional; 720P | 1080P; default 1080P "ratio": "16:9", // optional; 16:9,9:16,1:1,4:3,3:4 — omit ⇒ follows input video aspect "duration": 0, // optional; integer 2–10; DEFAULT 0 = keep input length; nonzero truncates from 0s "audio_setting": "auto", // optional; auto(def)=model decides (may regen audio) | origin=keep input audio "prompt_extend": true, // optional; default true "watermark": false, // optional; default false "seed": 12345 // optional }}- media type enum:
video(exactly 1, REQUIRED) +reference_image(0–4, optional). - Video: MP4/MOV, 2–10s, side 240–4096px, aspect 1:8–8:1, ≤100MB.
- reference_image: JPEG/JPG/PNG(no alpha)/BMP/WEBP, side 240–8000px, aspect 1:8–8:1, ≤20MB. URL or Base64.
- usage returns floats;
duration = input_video_duration + output_video_duration.
4b. happyhorse-1.0-video-edit — request body
Section titled “4b. happyhorse-1.0-video-edit — request body”{ "model": "happyhorse-1.0-video-edit", // REQUIRED "input": { // REQUIRED "prompt": "...", // REQUIRED, ≤5000 non-zh/≤2500 zh; style transfer / local replacement instruction "media": [ // REQUIRED; exactly 1 video + 0–5 reference_image { "type": "video", "url": "https://.../v.mp4" }, { "type": "reference_image", "url": "https://.../r.webp" } ] }, "parameters": { // optional "resolution": "1080P", // optional; 720P | 1080P; default 1080P "audio_setting": "auto", // optional; auto(def) | origin (keep input audio) "watermark": true, // optional; DEFAULT TRUE ("Happy Horse") "seed": 12345 // optional }}- media type enum:
video(exactly 1, REQUIRED) +reference_image(0–5, optional). - Video: MP4/MOV (H.264 recommended), 3–60s input, side ≤4096 / ≥360px, aspect 1:2.5–2.5:1, ≤100MB, fps >8. Output 3–15s: ≤15s input → same length; >15s input → first 15s only.
- reference_image: JPEG/JPG/PNG/WEBP, width & height ≥300px, aspect 1:2.5–2.5:1, ≤20MB. URL or Base64.
- NO
ratio, NOduration, NOprompt_extend, NOnegative_prompt(vs wan2.7-videoedit which has all four).
SUB-FAMILY 5 — ANIMATE (motion transfer / character swap)
Section titled “SUB-FAMILY 5 — ANIMATE (motion transfer / character swap)”Slugs: wan2.2-animate-move (motion transfer), wan2.2-animate-mix (character swap).
Endpoint: image2video/video-synthesis (DIFFERENT from all above).
Request body shape is IDENTICAL for move and mix; only the model name and semantics differ.
{ "model": "wan2.2-animate-move", // REQUIRED (or wan2.2-animate-mix) "input": { // REQUIRED "image_url": "https://.../char.jpeg", // REQUIRED; character image. JPG/JPEG/PNG/BMP/WEBP, side 200–4096px, aspect 1:3–3:1, ≤5MB. URL must be ASCII (encode non-ASCII). "video_url": "https://.../ref.mp4", // REQUIRED; reference video. MP4/AVI/MOV, side 200–2048px, aspect 1:3–3:1, 2–30s, ≤200MB. "watermark": true // OPTIONAL — note: in `input`, NOT in `parameters`. default false (move: "Generated by Qwen AI"; mix: "AI Generated") }, "parameters": { // REQUIRED (because `mode` is required) "mode": "wan-std", // REQUIRED; wan-std (fast/cheap) | wan-pro (smoother/higher quality) "check_image": true // optional; default true; validate input image before processing }}- NO prompt, NO negative_prompt, NO resolution, NO ratio, NO duration, NO seed, NO prompt_extend.
- Difference move vs mix:
- animate-move = “video motion transfer” (animate the character in the image using motion from the reference video; keeps photo background static).
- animate-mix = “video character swap” (replace the person in the video with the person from the image; keeps original background).
- Content moderation on all inputs/outputs (
IPInfringementSuspect/DataInspectionFailedon violation).
Animate response (poll) — note nested results
Section titled “Animate response (poll) — note nested results”{ "request_id": "...", "output": { "task_id": "...", "task_status": "SUCCEEDED", "submit_time": "2025-09-18 15:32:00.105", "scheduled_time": "2025-09-18 15:32:15.066", "end_time": "2025-09-18 15:34:41.898", "results": { "video_url": "http://...mp4?Expires=..." } // ← nested under results }, "usage": { "video_duration": 5.2, "video_ratio": "standard" } // video_ratio = mode: standard|pro}- Billing: output only, per output-video second; failed calls free.
SUB-FAMILY 6 — KEYFRAME (first-and-last-frame, kf2v)
Section titled “SUB-FAMILY 6 — KEYFRAME (first-and-last-frame, kf2v)”Slugs: wan2.2-kf2v-flash, wan2.1-kf2v-plus.
Endpoint: image2video/video-synthesis (same as animate).
{ "model": "wan2.2-kf2v-flash", // REQUIRED (or wan2.1-kf2v-plus) "input": { // REQUIRED "prompt": "...", // REQUIRED; describe transition (camera/subject motion). zh/en "negative_prompt": "...", // optional, ≤500 chars "first_frame_url": "https://.../f.png", // REQUIRED; output aspect follows this frame. JPEG/JPG/PNG(no alpha)/BMP/WEBP, side 240–8000px, ≤10MB "last_frame_url": "https://.../l.png" // REQUIRED; need not match first-frame resolution/aspect. same format limits, ≤10MB }, "parameters": { // optional "resolution": "720P", // optional; wan2.2-kf2v-flash: 480P|720P|1080P (default 720P); wan2.1-kf2v-plus: 720P only "duration": 5, // optional; FIXED 5 (only valid value) "prompt_extend": true, // optional; default true "watermark": false, // optional; default false ("AI-generated") "seed": 12345 // optional }}- Inputs are flat
first_frame_url/last_frame_url(NOT a media[] array). Also accepts localfile://paths via SDK. - usage:
{ video_duration: 5, video_count: 1, SR (2.2 only) | video_ratio="standard" (2.1 only) }. - Response returns
output.video_urltop-level (video-generation-style), plusactual_promptwhen prompt_extend=true.
CREATE RESPONSE (all video-generation & image2video families)
Section titled “CREATE RESPONSE (all video-generation & image2video families)”{ "output": { "task_status": "PENDING", "task_id": "0385dc79-..." }, "request_id": "4909100c-..."}On creation failure (top-level, no output.task_id):
{ "code": "InvalidApiKey", "message": "No API-key provided.", "request_id": "..." }POLL RESPONSE — SUCCEEDED (video-generation families: t2v / i2v / r2v / videoedit / kf2v / happyhorse)
Section titled “POLL RESPONSE — SUCCEEDED (video-generation families: t2v / i2v / r2v / videoedit / kf2v / happyhorse)”{ "request_id": "...", "output": { "task_id": "...", "task_status": "SUCCEEDED", "submit_time": "2025-09-29 14:18:52.331", // UTC+8, YYYY-MM-DD HH:mm:ss.SSS "scheduled_time": "2025-09-29 14:18:59.290", "end_time": "2025-09-29 14:23:39.407", "orig_prompt": "...", // = request prompt "actual_prompt": "...", // only when prompt_extend=true (NOT on wan2.6; present on wan2.7/kf2v/legacy) "video_url": "https://...mp4?Expires=..." // top-level; 24h; MP4 H.264; SUCCEEDED only }, "usage": { /* family-specific — see difference #15 */ }}Example usage shapes:
- wan2.7-t2v:
{ "duration":10, "input_video_duration":0, "output_video_duration":10, "video_count":1, "ratio":"16:9", "SR":720 } - wan2.6-t2v (legacy):
{ "duration":10, "size":"1280*720", "input_video_duration":0, "output_video_duration":10, "video_count":1, "SR":720 } - wan2.7-i2v:
{ "video_count":1, "duration":10, "input_video_duration":0, "output_video_duration":10, "SR":720 } - wan2.7-r2v:
{ "duration":15, "input_video_duration":5, "output_video_duration":10, "video_count":1, "SR":720, "ratio":"16:9" } - wan2.7-videoedit:
{ "duration":10.04, "input_video_duration":5.02, "output_video_duration":5.02, "video_count":1, "SR":720 } - kf2v:
{ "video_duration":5, "video_count":1, "SR":480 }(2.1:video_ratio":"standard"instead of SR) - happyhorse-1.0-t2v/r2v:
{ "duration":5, "input_video_duration":0, "output_video_duration":5, "video_count":1, "SR":720, "ratio":"16:9" }
POLL RESPONSE — FAILED (all families)
Section titled “POLL RESPONSE — FAILED (all families)”{ "request_id": "...", "output": { "task_id": "...", "task_status": "FAILED", "code": "InvalidParameter", "message": "The size does not match ..." }}POLL RESPONSE — expired (task_id older than 24h)
Section titled “POLL RESPONSE — expired (task_id older than 24h)”{ "request_id": "...", "output": { "task_id": "...", "task_status": "UNKNOWN" } }OUTPUT (poll) field dictionary
Section titled “OUTPUT (poll) field dictionary”| field | type | notes |
|---|---|---|
output.task_id | string | valid 24h |
output.task_status | string | PENDING / RUNNING / SUCCEEDED / FAILED / CANCELED / UNKNOWN |
output.submit_time / scheduled_time / end_time | string | UTC+8, YYYY-MM-DD HH:mm:ss.SSS |
output.video_url | string | SUCCEEDED only; 24h; MP4 H.264. Animate: under output.results.video_url |
output.results | object | animate-move / animate-mix only; { video_url } |
output.orig_prompt | string | echoes request prompt (absent on animate, which has no prompt) |
output.actual_prompt | string | rewritten prompt when prompt_extend=true; NOT returned by wan2.6; not on HappyHorse (no prompt_extend) |
output.code / output.message | string | FAILED only |
usage.duration | float/int | total billed seconds = input_video_duration + output_video_duration (video-generation families) |
usage.input_video_duration | int/float | input video seconds (0 for t2v/i2v-no-clip) |
usage.output_video_duration | int/float | output seconds = requested duration (where fixed) |
usage.video_duration | float/int | LEGACY t2v ≤2.5 / kf2v / animate billed seconds |
usage.SR | int | resolution tier number (480/720/1080) — wan2.6+ / wan2.7 / kf2v(2.2) / happyhorse |
usage.size | string | legacy wan2.6-t2v only, e.g. 1920×1080 |
usage.ratio | string | wan2.7-t2v / wan2.7-r2v / happyhorse-t2v/r2v, e.g. 16:9 |
usage.video_ratio | string | legacy t2v ≤2.5 (resolution) / kf2v-2.1 (“standard”) / animate (service mode: standard|pro) |
usage.video_count | int | always 1 |
request_id | string | trace id |
BILLING
Section titled “BILLING”- All video families: billed on output video duration in seconds (per-second pricing), resolution-dependent unit price (1080P > 720P > 480P).
- r2v / video continuation / video-edit:
duration(= input + output) is the billed amount. - animate:
mode(wan-pro > wan-std price). i2v-flashaudio=false⇒ silent-video price. - Failed tasks / processing errors are FREE and do not consume free quota.
- Output
video_urlandtask_idexpire after 24 hours — download immediately.