Skip to content

Wan 2.6 I2V

alibaba/wan2.6-i2v — a video model by Alibaba. Call it through the gateway’s standard OpenAI-compatible door using the catalog slug; the full parameter schema is reproduced in full below.

Catalog slugalibaba/wan2.6-i2v
Kindvideo
VendorAlibaba
Native model idwan2.6-i2v

Through the Sociaro SDK / OpenAI-compatible door

Section titled “Through the Sociaro SDK / OpenAI-compatible door”

Video generation is asynchronous (create → poll → result). The SDK’s video.generate drives the whole cycle and blocks until the job reaches a terminal state:

from sociaro_ai import Sociaro
client = Sociaro(api_key="gw_live_...")
result = client.video.generate(
model="alibaba/wan2.6-i2v",
prompt="a timelapse of a blooming flower",
# resolution / duration / audio … — see the schema below
)
print(result.url)

For a non-blocking handle use job = client.video.submit(model="alibaba/wan2.6-i2v", …) then job.result(). Raw door: POST https://api.sociaro.com/v1/videos (create), then poll — see async jobs and media doors.

Through Alibaba DashScope’s native API (advanced)

Section titled “Through Alibaba DashScope’s native API (advanced)”

Optional: send Alibaba DashScope’s native request to the /alibaba prefix, using the native model id wan2.6-i2v. The gateway injects the upstream Alibaba DashScope credential and forwards the body unchanged (catalog, pricing and entitlements still apply).

Terminal window
curl https://api.sociaro.com/alibaba/<native-path> \
-H "Authorization: Bearer $SOCIARO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "wan2.6-i2v", ... }'

The exact path, request body and response shape are documented in full in the schema below.

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-i2v (or the native id wan2.6-i2v for the native API) 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 slugdocumented on pagetask familyendpointrequest body style
happyhorse-1.0-t2vhappyhorse-text-to-video-api-referencetext-to-videovideo-generation/video-synthesisinput.prompt + parameters
happyhorse-1.0-i2vhappyhorse-image-to-video-api-referenceimage-to-video (first frame)video-generation/video-synthesisinput.prompt + input.media[] (first_frame)
happyhorse-1.0-r2vhappyhorse-reference-to-video-api-referencereference-to-video (multi-image)video-generation/video-synthesisinput.prompt + input.media[] (reference_image 1–9)
happyhorse-1.0-video-edithappyhorse-video-edit-api-referencevideo editingvideo-generation/video-synthesisinput.prompt + input.media[] (video + reference_image 0–5)
wan2.2-animate-mixwan-animate-mix-apivideo character swapimage2video/video-synthesisflat input.image_url + input.video_url; parameters.mode
wan2.2-animate-movewan-animate-move-apivideo motion transferimage2video/video-synthesisflat input.image_url + input.video_url; parameters.mode
wan2.2-kf2v-flashlegacy-image-to-video-by-first-and-last-frame-api-referencekeyframe (first+last frame)image2video/video-synthesisflat input.first_frame_url + input.last_frame_url
wan2.6-i2vlegacy-image-to-video-api-referenceimage-to-video (first frame, LEGACY)video-generation/video-synthesisflat input.img_url (+ audio_url); parameters.shot_type
wan2.6-i2v-flashlegacy-image-to-video-api-referenceimage-to-video (first frame, LEGACY)video-generation/video-synthesisflat input.img_url (+ audio_url); parameters.shot_type, parameters.audio
wan2.6-r2vuse-video-generation (capability matrix)reference-to-videovideo-generation/video-synthesismedia[]-style reference-to-video; request-parameter contract not published in a dedicated API reference
wan2.6-r2v-flashuse-video-generation (capability matrix)reference-to-videovideo-generation/video-synthesismedia[]-style reference-to-video; request-parameter contract not published in a dedicated API reference
wan2.6-t2vtext-to-video-api-reference (LEGACY protocol section)text-to-videovideo-generation/video-synthesisinput.prompt (+ audio_url); parameters.size, shot_type
wan2.7-i2vimage-to-video-general-api-referenceimage-to-video (1st frame / 1st+last / continuation)video-generation/video-synthesisinput.prompt + input.media[] (first_frame/last_frame/driving_audio/first_clip)
wan2.7-r2vwan-video-to-video-api-referencereference-to-videovideo-generation/video-synthesisinput.prompt + input.media[] (reference_image/reference_video/first_frame + reference_voice)
wan2.7-t2vtext-to-video-api-reference (NEW protocol section)text-to-videovideo-generation/video-synthesisinput.prompt (+ audio_url); parameters.resolution/ratio
wan2.7-videoeditwan-video-editing-api-referencevideo editingvideo-generation/video-synthesisinput.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)”
  1. 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 SAME GET .../api/v1/tasks/{task_id}.

  2. 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": ... } (+ optional reference_voice on 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) or input.first_frame_url+input.last_frame_url (kf2v).
    • prompt-only input (t2v): wan2.7-t2v, wan2.6-t2v, happyhorse-1.0-t2v (+ optional audio_url).
  3. parameters.size (legacy) vs parameters.resolution+ratio (new).

    • LEGACY t2v (wan2.6/2.5/2.2/2.1) and LEGACY i2v use size = explicit width*height string (e.g. 1280*720).
    • NEW t2v (wan2.7), i2v, r2v, videoedit, and ALL HappyHorse use resolution (tier 720P/1080P/480P) + ratio (where applicable).
    • kf2v uses resolution (tier). animate uses neither (output follows input; only mode).
  4. resolution allowed tiers & defaults differ:

    • wan2.7-t2v / wan2.7-i2v / wan2.7-r2v / wan2.7-videoedit: 720P, 1080P — default 1080P (i2v/r2v/videoedit) / default 1080P (t2v).
    • wan2.6-i2v / wan2.6-i2v-flash: 720P, 1080P — default 1080P.
    • 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 — default 720P; wan2.1-kf2v-plus: 720P only.
    • happyhorse-1.0-t2v / -i2v / -r2v / -video-edit: 720P, 1080P — default 1080P.
    • animate-move / animate-mix: NO resolution param (mode wan-std/wan-pro controls quality tier).
  5. ratio parameter 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 ratio is ignored if a first_frame is provided (wan2.7-r2v) — output then follows the first frame.
  6. duration range / 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).
  7. AUDIO support (input audio_url / driving_audio AND 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_audio media element (2–30s, ≤15 MB).
    • wan2.6-i2v / wan2.5-i2v: optional input.audio_url (3–30s, ≤15 MB). wan2.6-i2v-flash adds parameters.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.
  8. prompt requiredness & 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 prompt field).
  9. prompt_extend presence: present (default true) on wan2.7 t2v/i2v/r2v/videoedit, wan2.6 t2v/i2v, kf2v. ABSENT on HappyHorse (all 4), animate-move, animate-mix.

  10. watermark default 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 in parameters for media-style families but in input for animate-move/animate-mix.

  11. seed is 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.)

  12. shot_type (single/multi, default single) is wan2.6-series ONLY (wan2.6-t2v, wan2.6-i2v). Effective only when prompt_extend=true; shot_type overrides prompt-stated shot count. Absent everywhere else (wan2.7 controls shots via natural-language prompt; its shot_type “has no effect”).

  13. animate-only parameters: mode (REQUIRED; wan-std | wan-pro) + check_image (bool, default true). These are the ONLY two animate parameters. parameters object is REQUIRED for animate (because mode is required).

  14. Response output shape differs between the two endpoints:

    • video-generation endpoint (t2v/i2v/r2v/videoedit/kf2v/happyhorse): output.video_url is a top-level field under output.
    • image2video endpoint (animate-move/animate-mix): output.results.video_url is nested under results.
  15. usage object differs by family:

    • NEW media-style (wan2.7 + happyhorse t2v/i2v/r2v/videoedit): { duration, input_video_duration, output_video_duration, video_count, SR } (+ ratio for 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 } where video_ratio = service mode (standard for wan-std, pro for wan-pro).
  16. Regions / endpoints (per-region API keys; cross-region calls FAIL):

    • Singapore (recommended, workspace domain): https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com (legacy https://dashscope-intl.aliyuncs.com deprecating).
    • 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.
  17. wan2.6-t2v-flash does NOT exist (no t2v-flash slug in catalog). -flash variants exist for i2v (wan2.6-i2v-flash) and r2v (wan2.6-r2v-flash) only in the wan2.6 series; kf2v has wan2.2-kf2v-flash.


OperationMethod + 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: enable is 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_id validity: 24 hours. video_url validity: 24 hours (then purged — save immediately). Video output: MP4, H.264.
  • Poll interval recommendation: ~15 s. State machine: PENDING → RUNNING → SUCCEEDED | FAILED (also CANCELED; UNKNOWN = task not found / expired).
  • DashScope SDK (Python VideoSynthesis, Java VideoSynthesis) 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.

HeaderTypeReqValue
Content-Typestringyesapplication/json
AuthorizationstringyesBearer sk-xxxx
X-DashScope-Asyncstringyesenable (Create only; HTTP is async-only)
  • Header: Authorization: Bearer sk-xxxx.
  • Path param: task_id (string, required).
  • No body.

Slugs: wan2.7-t2v (NEW protocol), wan2.6-t2v (LEGACY protocol), happyhorse-1.0-t2v. Endpoint: video-generation/video-synthesis.

{
"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:

Tier16:99:161:14:33:4
720P1280×720720×1280960×9601104×832832×1104
1080P1920×10801080×19201440×14401648×12481248×1648
{
"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).
{
"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, NO prompt_extend, NO audio_url.


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_framedriving_audio)
  • first-and-last-frame: first_frame + last_framedriving_audio)
  • video continuation: first_cliplast_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 type enum: 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_url aspect (no ratio/size for the new-tier resolution field on these models — they use the tier resolution, not legacy size).
  • 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_frame ONLY (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), NO negative_prompt, NO prompt_extend, NO audio.

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.

{
"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 type enum: 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: explicit reference_voice > original reference_video audio.
  • usage adds ratio; duration = input_video_duration + output_video_duration (billed total).
  • 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-reference page documents the request parameters for wan2.7-r2v only.)

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_image ONLY; 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-bracketed Image 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.

{
"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, NO duration, NO prompt_extend, NO negative_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 / DataInspectionFailed on 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 local file:// paths via SDK.
  • usage: { video_duration: 5, video_count: 1, SR (2.2 only) | video_ratio="standard" (2.1 only) }.
  • Response returns output.video_url top-level (video-generation-style), plus actual_prompt when 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" }
{
"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" } }

fieldtypenotes
output.task_idstringvalid 24h
output.task_statusstringPENDING / RUNNING / SUCCEEDED / FAILED / CANCELED / UNKNOWN
output.submit_time / scheduled_time / end_timestringUTC+8, YYYY-MM-DD HH:mm:ss.SSS
output.video_urlstringSUCCEEDED only; 24h; MP4 H.264. Animate: under output.results.video_url
output.resultsobjectanimate-move / animate-mix only; { video_url }
output.orig_promptstringechoes request prompt (absent on animate, which has no prompt)
output.actual_promptstringrewritten prompt when prompt_extend=true; NOT returned by wan2.6; not on HappyHorse (no prompt_extend)
output.code / output.messagestringFAILED only
usage.durationfloat/inttotal billed seconds = input_video_duration + output_video_duration (video-generation families)
usage.input_video_durationint/floatinput video seconds (0 for t2v/i2v-no-clip)
usage.output_video_durationint/floatoutput seconds = requested duration (where fixed)
usage.video_durationfloat/intLEGACY t2v ≤2.5 / kf2v / animate billed seconds
usage.SRintresolution tier number (480/720/1080) — wan2.6+ / wan2.7 / kf2v(2.2) / happyhorse
usage.sizestringlegacy wan2.6-t2v only, e.g. 1920×1080
usage.ratiostringwan2.7-t2v / wan2.7-r2v / happyhorse-t2v/r2v, e.g. 16:9
usage.video_ratiostringlegacy t2v ≤2.5 (resolution) / kf2v-2.1 (“standard”) / animate (service mode: standard|pro)
usage.video_countintalways 1
request_idstringtrace id
  • 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-flash audio=false ⇒ silent-video price.
  • Failed tasks / processing errors are FREE and do not consume free quota.
  • Output video_url and task_id expire after 24 hours — download immediately.