Wan 生视频参数
Wan(万相)走统一生视频契约:POST /video/generations + GET /video/tasks/{taskId}。本页说明现网上架码差异与可复制示例。
通用字段表见 视频生成 · 高级参数。端点说明见 创建视频生成任务。模型列表见 获取模型(modality=video)或 模型广场。
模型 ID
model | 典型能力 | 分辨率 | 时长(秒) |
|---|---|---|---|
wan2.7 | 文生;首帧 / 首尾帧;参考生;可选驱动音频 / 续写 | 720p / 1080p | 文生/图生约 2~15;参考生常见约 2~10 |
wan2.6 | 文生;首帧图生;参考生 | 720p / 1080p | 同上量级 |
wan2.6-flash | 加速图生 / 参考生 | 720p / 1080p | 同上量级 |
wan2.7-videoedit | 视频编辑(按 prompt 改已有视频) | 720p / 1080p | 输出常约 ≤10;duration_sec=0 表示跟随片源时长 |
公共约束
| 项 | 说明 |
|---|---|
resolution | 720p 或 1080p |
aspect_ratio | 如 16:9、9:16、1:1、4:3、3:4 |
generate_audio | 可选;是否生成/保留有声(Flash 等档位行为因模型而异) |
| 模式切换 | 由请求中的素材形状决定:无素材→文生;frame_images→图生;多参考→参考生(无需改 model,wan2.7 / wan2.6 同码) |
wan2.7-videoedit | 独立模型码;须 prompt + 恰好 1 条 input_references 的 video_url;可选附加参考图(最多 4 张) |
文生视频
json
{
"model": "wan2.7",
"prompt": "产品在柔光棚中缓慢旋转,电影感运镜",
"duration_sec": 5,
"resolution": "1080p",
"aspect_ratio": "16:9",
"generate_audio": true
}首帧图生
json
{
"model": "wan2.7",
"prompt": "镜头缓慢推进,主体保持清晰",
"duration_sec": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"frame_images": [
{
"type": "image_url",
"frame_type": "first_frame",
"image_url": { "url": "https://example.com/first.png" }
}
]
}wan2.6 / wan2.6-flash 图生同样使用 frame_images 首帧;wan2.7 另支持首尾帧(同时传 first_frame 与 last_frame)。
参考生视频
json
{
"model": "wan2.7",
"prompt": "多角色对话,保持参考图外观一致",
"duration_sec": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"input_references": [
{
"type": "image_url",
"image_url": { "url": "https://example.com/character-a.png" }
},
{
"type": "image_url",
"image_url": { "url": "https://example.com/character-b.png" }
}
]
}视频编辑(wan2.7-videoedit)
json
{
"model": "wan2.7-videoedit",
"prompt": "将背景换成日落海滩,保持人物动作不变",
"duration_sec": 0,
"resolution": "1080p",
"aspect_ratio": "16:9",
"input_references": [
{
"type": "video_url",
"video_url": "https://example.com/source.mp4"
}
]
}duration_sec 为 0 时,输出时长跟随输入视频;大于 0 时按指定秒数输出(上限以模型能力为准)。