跳到主要内容
AI
MarkdownLLMs.txt

Wan 2.6 视频生成

Wan 2.6 覆盖文生视频、图生视频和参考生视频模型家族。来源范围还包含 Wan 2.6 公共模型秒数参照表。

支持模型

模型类型秒数规则
wan2.6-video-720p文生视频 / 图生视频必传;51015
wan2.6-video-1080p文生视频 / 图生视频必传;51015
wan2.6-i2v-flash-720p-audio图生视频有声必传;515 的任意整数。
wan2.6-i2v-flash-720p-silent图生视频无声必传;515 的任意整数。
wan2.6-i2v-flash-1080p-audio图生视频有声必传;515 的任意整数。
wan2.6-i2v-flash-1080p-silent图生视频无声必传;515 的任意整数。
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

请求参数

参数类型必填说明
modelstringWan 2.6 模型 ID。
promptstring提示词。
imagestring条件必填图生视频参考图。
imagesstring[]条件必填R2V 模型参考图。
videosstring[]条件必填R2V 模型参考视频。
durationinteger参照支持模型表。
sizestring输出尺寸。文生视频可用它控制横版或竖版;图生视频跟随参考图方向。
extra_body.negative_promptstring不希望出现的内容。
extra_body.shot_typestringsinglemulti
extra_body.seedinteger-1 表示随机;固定值更利于复现。
extra_body.audiostring公开可访问的音频 URL。
extra_body.enable_prompt_expansionbooleanR2V 模型提示词扩展开关。

常见 size 包括 1280*720720*12801920*10801080*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

相关页面