Wan 2.6 视频生成
Wan 2.6 覆盖文生视频、图生视频和参考生视频模型家族。来源范围还包含 Wan 2.6 公共模型秒数参照表。
支持模型
| 模型 | 类型 | 秒数规则 |
|---|---|---|
wan2.6-video-720p | 文生视频 / 图生视频 | 必传;5、10 或 15。 |
wan2.6-video-1080p | 文生视频 / 图生视频 | 必传;5、10 或 15。 |
wan2.6-i2v-flash-720p-audio | 图生视频有声 | 必传;5 到 15 的任意整数。 |
wan2.6-i2v-flash-720p-silent | 图生视频无声 | 必传;5 到 15 的任意整数。 |
wan2.6-i2v-flash-1080p-audio | 图生视频有声 | 必传;5 到 15 的任意整数。 |
wan2.6-i2v-flash-1080p-silent | 图生视频无声 | 必传;5 到 15 的任意整数。 |
wan2.6-r2v-720p | 参考生视频 | 必传;以账号模型配置为准。 |
wan2.6-r2v-1080p | 参考生视频 | 必传;以账号模型配置为准。 |
wan2.6-r2v-flash-720p-audio | 参考生视频有声 | 必传;以账号模型配置为准。 |
wan2.6-r2v-flash-720p-silent | 参考生视频无声 | 必传;以账号模型配置为准。 |
wan2.6-r2v-flash-1080p-audio | 参考生视频有声 | 必传;以账号模型配置为准。 |
wan2.6-r2v-flash-1080p-silent | 参考生视频无声 | 必传;以账号模型配置为准。 |
Endpoint
POST /v1/video/generations
GET /v1/videos/{task_id}
Authentication
Authorization: Bearer sk-***
Content-Type: application/json
请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | Wan 2.6 模型 ID。 |
prompt | string | 是 | 提示词。 |
image | string | 条件必填 | 图生视频参考图。 |
images | string[] | 条件必填 | R2V 模型参考图。 |
videos | string[] | 条件必填 | R2V 模型参考视频。 |
duration | integer | 是 | 参照支持模型表。 |
size | string | 否 | 输出尺寸。文生视频可用它控制横版或竖版;图生视频跟随参考图方向。 |
extra_body.negative_prompt | string | 否 | 不希望出现的内容。 |
extra_body.shot_type | string | 否 | single 或 multi。 |
extra_body.seed | integer | 否 | -1 表示随机;固定值更利于复现。 |
extra_body.audio | string | 否 | 公开可访问的音频 URL。 |
extra_body.enable_prompt_expansion | boolean | 否 | R2V 模型提示词扩展开关。 |
常见 size 包括 1280*720、720*1280、1920*1080 和 1080*1920。
文生视频示例
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.6-video-1080p",
"prompt": "sunrise",
"duration": 5,
"size": "1080*1920",
"extra_body": {
"negative_prompt": "blur, watermark",
"shot_type": "multi",
"seed": -1
}
}'
参考视频示例
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.6-r2v-flash-720p-audio",
"prompt": "Keep the same subject identity and cinematic style, generate a faster-paced new shot.",
"videos": [
"https://example.com/reference-shot-1.mp4"
],
"size": "1280*720",
"duration": 5,
"extra_body": {
"negative_prompt": "watermark, blur, flicker",
"audio": "https://example.com/guide-audio.mp3",
"shot_type": "single",
"enable_prompt_expansion": false,
"seed": -1
}
}'
多图参考示例
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.6-r2v-flash-1080p-silent",
"prompt": "Keep the same product identity and style, generate a clean marketing video.",
"images": [
"https://example.com/ref-1.png",
"https://example.com/ref-2.png"
],
"size": "1920*1080",
"duration": 10,
"extra_body": {
"negative_prompt": "watermark, blur",
"shot_type": "multi",
"enable_prompt_expansion": true,
"seed": 42
}
}'
查询任务状态
curl "{BASE_URL}/v1/videos/task_xxx" \
-H "Authorization: Bearer sk-***"
{
"id": "task_xxx",
"task_id": "task_xxx",
"object": "video.generation.job",
"model": "wan2.6-video-1080p",
"status": "completed",
"progress": 100,
"video_url": "https://example.com/output.mp4"
}
计费说明
Wan 2.6 计费与模型家族、输出分辨率、时长、音频模式,以及任务是文生、图生还是参考生视频有关。最终以结算记录为准。
常见错误
- 使用所选模型不允许的秒数。
- 期望图生视频通过
size控制横竖版;图生通常跟随参考图方向。 - 传入私有媒体 URL。
- 用非 R2V 模型传 R2V 字段。
- 静音模型中传入
audio。