Wan
Endpoint: POST https://vod.intl.tencentcloudapi.comAction: CreateAigcVideoTask
Wan 是视频生成模型,支持文生视频、首帧 / 首尾帧生视频,以及图片(10 张)、视频(5 个)、音频(5 个)的多模态参考生成。时长 2~30 秒,最高 1080P 输出,可超分至 4K。
基本信息
| 项目 | 取值 |
|---|---|
| ModelName | Wan |
| ModelVersion | 3.0 / 3.0-prime |
| 提示词长度 | 最多 20,000 字 |
| 默认值 | ModelVersion=3.0 / Duration=5 / AspectRatio=adaptive |
| 是否支持解除安全护栏 | 支持 |
各版本支持的规格
| 版本 | 分辨率 | 比例 | 时长 |
|---|---|---|---|
3.0 / 3.0-prime | 默认输出:480P / 720P / 1080P超分输出: 2K / 4K | 16:9 / 9:16 / 4:3 / 3:4 / 1:1 / adaptive | 2–30 秒;若有参考视频,输入+输出需在 30 秒 以下 |
输入条件
| 项目 | 条件 |
|---|---|
| 输出帧率 | 30fps |
| 参考图片 | 最多 10 张 |
| 参考视频 | 最多 5 个,合计 15 秒 |
| 参考音频 | 最多 5 个,合计 15 秒 |
3.0 为标准版本,3.0-prime 为高速版本。
请求参数
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
ModelName | 必填 | String | 固定值 Wan |
ModelVersion | 可选 | String | 3.0 / 3.0-prime |
Prompt | 必填 | String | 生成提示词。最多 20,000 字 |
FileInfos.N | 可选 | Array | 参考输入。Usage 为 FirstFrame / LastFrame / Reference |
OutputConfig.Resolution | 可选 | String | 480P / 720P / 1080P / 2K / 4K |
OutputConfig.Duration | 可选 | Integer | 视频时长(秒)。默认值 5 |
OutputConfig.AspectRatio | 可选 | String | adaptive / 16:9 / 4:3 / 1:1 / 3:4 / 9:16 |
OutputConfig.InputComplianceCheck | 可选 | String | 显式传入 Disabled 即解除输入审核。使用前请咨询销售负责人 |
OutputConfig.OutputComplianceCheck | 可选 | String | 显式传入 Disabled 即解除输出审核。使用前请咨询销售负责人 |
请求示例
json
{
"SubAppId": 123456789,
"ModelName": "Wan",
"ModelVersion": "3.0",
"Prompt": "a woman walks through a sunlit marketplace, camera follows behind her",
"OutputConfig": {
"Resolution": "1080P",
"Duration": 10,
"AspectRatio": "9:16",
"StorageMode": "Temporary"
},
"SessionContext": "job-001"
}响应示例
json
{
"AigcVideoTask": {
"Status": "FINISH",
"ErrCode": 0,
"Progress": 100,
"Output": {
"FileInfos": [
{
"FileUrl": "http://<host>.vod2.myqcloud.com/.../aigcVideoGenFile.mp4",
"ExpireTime": "2026-08-01T10:29:48Z",
"MetaData": {
"Width": 1920,
"Height": 1080,
"Duration": 5.07,
"Container": "mov,mp4,m4a",
"Bitrate": 9494850
}
}
]
}
}
}特殊设置
解除安全护栏
输入审核与输出审核可分别设置。
如需使用护栏解除参数,须先联系销售负责人确认使用权限。即使在支持的引擎上,也只有显式传入相应参数时才会解除护栏。省略参数则不会解除。
| 参数 | 解除值 | 适用对象 |
|---|---|---|
OutputConfig.InputComplianceCheck | Disabled | 解除输入审核 |
OutputConfig.OutputComplianceCheck | Disabled | 解除输出审核 |
将以下设置合并到已有的生成请求中。若要同时解除输入与输出审核,请一并传入这两个字段。
json
{
"OutputConfig": {
"InputComplianceCheck": "Disabled",
"OutputComplianceCheck": "Disabled"
}
}首/尾帧生成
通过 FileInfos.N.Usage 指定 FirstFrame / LastFrame。
json
{
"SubAppId": 123456789,
"ModelName": "Wan",
"ModelVersion": "3.0",
"FileInfos": [
{
"Type": "Url",
"Category": "Image",
"Url": "https://<cos>/first.png",
"Usage": "FirstFrame"
},
{
"Type": "Url",
"Category": "Image",
"Url": "https://<cos>/last.jpg",
"Usage": "LastFrame"
}
],
"Prompt": "she opens the window, looks into the distance, then runs out of the castle and rides away",
"OutputConfig": {
"Duration": 10,
"Resolution": "2K",
"AspectRatio": "9:16",
"StorageMode": "Permanent"
},
"SessionContext": "job-001"
}| 输入 | 约束 |
|---|---|
| 首/尾帧格式 | JPEG / JPG / 不透明 PNG / BMP / WEBP |
| 首/尾帧分辨率 | 单边 [240, 8000] 像素 |
| 首/尾帧比例 | 8:1 以下 |
| 首/尾帧大小 | 20MB 以下 |
首/尾帧输入
Wan 通过首帧 1 张 或首/尾帧组合生成。
多模态参考生成
通过 Usage=Reference 将图片、视频、音频指定为参考,用 Category 区分类型。
| 输入 | 约束 |
|---|---|
| 图片 | 最多 10 张。JPEG / JPG / 不透明 PNG / BMP / WEBP。单边 [240, 8000] 像素,比例 8:1 以下,20MB 以下 |
| 视频 | 最多 5 个。mp4 / mov。单个 1~15 秒,整体 15 秒 以下。单边 [240, 4096] 像素,比例 8:1 以下,单个 100MB 以下 |
| 音频 | 最多 5 个。wav / mp3。单个 1~15 秒,整体 15 秒 以下。单个 15MB 以下 |
json
{
"SubAppId": 123456789,
"ModelName": "Wan",
"ModelVersion": "3.0",
"FileInfos": [
{
"Type": "Url",
"Category": "Image",
"Url": "https://<cos>/ref1.png",
"Usage": "Reference"
},
{
"Type": "Url",
"Category": "Video",
"Url": "https://<cos>/ref2.mp4",
"Usage": "Reference"
}
],
"Prompt": "the character from the reference image walks through the scene in the reference video",
"OutputConfig": {
"Duration": 10,
"Resolution": "1080P",
"AspectRatio": "16:9",
"StorageMode": "Temporary"
},
"SessionContext": "job-001"
}首/尾帧与参考模式
首/尾帧模式与多模态参考模式二选一。参考模式下可组合图片 / 视频 / 音频。
视频时长
| 条件 | 允许范围 |
|---|---|
| 无视频输入 | [2, 30] 范围内的整数 |
| 有视频输入 | 输入视频总时长 + 输出视频时长在 30 秒 以下 |
Duration=-1 | 智能时长。模型根据提示词与输入媒体自动决定时长 |
json
{
"OutputConfig": {
"Duration": -1,
"Resolution": "1080P",
"StorageMode": "Temporary"
}
}