文档版本:v1.0.0 | 最后更新:2026-07-22 本平台已完整适配通义万相(Wan)官方视频生成接口,请求与响应均为透传,参数语义与官方一致。
| 模型 | 能力 | 适用场景 |
|---|---|---|
wan2.2-animate-move | 动作迁移:将参考视频中的动作和表情迁移到图片人物上,让图片人物"动起来" | 舞蹈复刻、高难度肢体动作复刻、影视表演复刻,可作为动作捕捉的低成本替代方案 |
wan2.2-animate-mix | 视频换人:将视频中的主角替换为图片中的角色,同时保留原视频的场景、光照和色调(不改变原始视频的动作、表情及环境) | 二次创作、影视后期制作等角色替换场景 |
model 字段区分;均提供两种服务模式(parameters.mode):| 模式 | 说明 |
|---|---|
wan-std 标准模式 | 生成速度快、性价比高,适合快速预览和基础动画场景 |
wan-pro 专业模式 | 动画流畅度更高、画质更优、效果更佳,处理时间和费用相应增加 |
POST https://platform.shuyanai.com/ali/api/v1/services/aigc/image2video/video-synthesis| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
Content-Type | string | 是 | application/json | 数据交换格式 |
Authorization | string | 是 | 鉴权信息,Bearer {API_KEY} |
官方要求的 X-DashScope-Async: enable头由平台自动补充,调用时无需携带;携带亦兼容。
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
model | string | 是 | wan2.2-animate-move(动作迁移)或 wan2.2-animate-mix(视频换人) | |
input | object | 是 | 输入参数对象 | |
input.image_url | string | 是 | 人物图片的公网可访问 HTTP/HTTPS URL。URL 含中文等非 ASCII 字符时须先进行 URL 编码 | |
input.video_url | string | 是 | 参考视频的公网可访问 HTTP/HTTPS URL。同样须 URL 编码。官方建议使用高分辨率、高帧率的参考视频以提升生成画质 | |
input.watermark | boolean | 否 | false | 是否在视频右下角添加 AI 生成水印。true 添加,false 不添加 |
parameters | object | 是 | 参数对象 | |
parameters.mode | string | 是 | 服务模式:wan-std(标准)/ wan-pro(专业),差异见上方模式对比表 | |
parameters.check_image | boolean | 否 | true | 是否在处理前对输入图片进行检测。true 检测;false 跳过检测直接处理 |
| 项目 | 图片 image_url | 视频 video_url |
|---|---|---|
| 格式 | JPG、JPEG、PNG、BMP、WEBP | MP4、AVI、MOV |
| 尺寸 | 宽高均在 [200, 4096] 像素,宽高比 1:3 ~ 3:1 | 宽高均在 [200, 2048] 像素,宽高比 1:3 ~ 3:1 |
| 大小 | ≤ 5 MB | ≤ 200 MB |
| 时长 | — | 2 ~ 30 秒 |
curl --request POST \
--url 'https://platform.shuyanai.com/ali/api/v1/services/aigc/image2video/video-synthesis' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.2-animate-move",
"input": {
"image_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250919/adsyrp/move_input_image.jpeg",
"video_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250919/kaakcn/move_input_video.mp4"
},
"parameters": {
"mode": "wan-std"
}
}'curl --request POST \
--url 'https://platform.shuyanai.com/ali/api/v1/services/aigc/image2video/video-synthesis' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.2-animate-mix",
"input": {
"image_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250919/adsyrp/move_input_image.jpeg",
"video_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250919/kaakcn/move_input_video.mp4"
},
"parameters": {
"mode": "wan-pro"
}
}'{
"output": {
"task_status": "PENDING",
"task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx"
},
"request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx"
}| 字段 | 类型 | 说明 |
|---|---|---|
output.task_id | string | 任务 ID,用于轮询查询,有效期 24 小时 |
output.task_status | string | 任务状态,创建成功时为 PENDING |
request_id | string | 请求唯一标识,用于溯源排查 |
output.results.video_url(MP4,H.264 编码,有效期 24 小时),usage 字段为计费依据:{
"output": {
"task_status": "SUCCEEDED",
"results": {
"video_url": "https://.../xxxxx.mp4?Expires=xxx"
}
},
"usage": {
"video_duration": 5.2,
"video_ratio": "standard"
}
}| 字段 | 类型 | 说明 |
|---|---|---|
usage.video_duration | float | 本次成功生成的视频时长,单位:秒 |
usage.video_ratio | string | 服务模式标识:standard(对应 wan-std)/ pro(对应 wan-pro) |
task_id 轮询任务状态及结果:GET https://platform.shuyanai.com/ali/api/v1/tasks/{task_id}