参考文件生视频
通过 file 类型传入文件,模型自动理解文件内容生成视频。
curl --location 'https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
-H 'X-DashScope-Async: enable' \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "wan3.0-video",
"input": {
"prompt": "一支高端智能眼镜产品广告,整体风格极简、未来感、时尚高级,光影克制,画面以黑色、银灰色、冰蓝色为主色调,局部点缀柔和白光与参数UI图形。开场在纯黑背景中,一副智能眼镜从黑暗中缓缓浮现,镜腿边缘掠过精致高光,镜框轮廓在冷冽边缘光下被勾勒出来,镜头超近距离掠过镜片、鼻托、转轴、镜腿与材质细节,展现金属与高性能复合材料的细腻质感,表面处理高级克制,线条轻薄流畅。随后产品在空中缓慢旋转,画面以极简动态图形同步展示核心参数信息。随后镜头快速收拢,所有零件精准回归组装成完整产品,切换到年轻模特佩戴展示,模特五官立体、气质自信,穿着简洁高级的都市时尚服装,在极简空间和城市光影环境中自然转头、抬手、行走、微笑,镜头从正面、侧面、斜后方展示眼镜佩戴状态,突出轻薄贴合、时尚轮廓与日常百搭属性。结尾在纯色背景中,产品悬浮定格,镜头缓慢推进到品牌logo和核心slogan,整体音乐极简电子氛围配合精准鼓点,节奏干净有力,画面质感高级、克制、纯粹,具有强烈品牌记忆点和国际化科技审美。",
"media": [
{
"type": "file",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260806/ebapmr/glass.pptx"
}
]
},
"parameters": {
"resolution": "480P",
"ratio": "adaptive",
"duration": 10,
"prompt_extend": true
}
}'
参考生视频
通过 input.media 传入参考图片、视频、音频、文件或网页链接,模型自动理解意图生成视频。
curl --location 'https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
-H 'X-DashScope-Async: enable' \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "wan3.0-video",
"input": {
"prompt": "视频1抱着图3,在图4的椅子上弹奏一支舒缓的乡村民谣,并说道:"今天的阳光真好。"图1手中拿着图2,路过视频1,把手中的图2放到视频1旁边的桌子上,并说道:"真好听,能不能再唱一遍"。",
"media": [
{
"type": "reference_image",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/sjuytr/wan-r2v-object-girl.jpg"
},
{
"type": "reference_video",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qigswt/wan-r2v-role2.mp4"
},
{
"type": "reference_image",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/rtjeqf/wan-r2v-object3.png"
},
{
"type": "reference_image",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qpzxps/wan-r2v-object4.png"
},
{
"type": "reference_image",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/wfjikw/wan-r2v-backgroud5.png"
}
]
},
"parameters": {
"resolution": "480P",
"ratio": "adaptive",
"duration": 5,
"prompt_extend": true
}
}'
文生视频
仅通过 prompt 生成视频,不传入任何媒体文件。
curl --location 'https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
-H 'X-DashScope-Async: enable' \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "wan3.0-video",
"input": {
"prompt": "一只小猫在月光下的屋顶上奔跑,城市的霓虹灯在远处闪烁,电影级画质,流畅运镜。"
},
"parameters": {
"resolution": "480P",
"ratio": "adaptive",
"duration": 5,
"prompt_extend": true
}
}'
首帧生视频
通过 first_frame 严格指定视频首帧图像。
curl --location 'https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
-H 'X-DashScope-Async: enable' \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "wan3.0-video",
"input": {
"prompt": "一幅都市奇幻艺术的场景。一个充满动感的涂鸦艺术角色。一个由喷漆所画成的少年,正从一面混凝土墙上活过来。他一边用极快的语速演唱一首英文rap,一边摆着一个经典的、充满活力的说唱歌手姿势。场景设定在夜晚一个充满都市感的铁路桥下。灯光来自一盏孤零零的街灯,营造出电影般的氛围,充满高能量和惊人的细节。视频的音频部分完全由rap构成,没有其他对话或杂音。",
"media": [
{
"type": "first_frame",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png"
}
]
},
"parameters": {
"resolution": "480P",
"ratio": "adaptive",
"duration": 5,
"prompt_extend": true
}
}'
首尾帧生视频
同时传入 first_frame 和 last_frame,严格指定视频的首帧和尾帧图像。
curl --location 'https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
-H 'X-DashScope-Async: enable' \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "wan3.0-video",
"input": {
"prompt": "一个年轻女孩从微笑逐渐变为大笑,镜头缓缓推进,背景光线从冷色调渐变为暖色调。",
"media": [
{
"type": "first_frame",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png"
},
{
"type": "last_frame",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/sjuytr/wan-r2v-object-girl.jpg"
}
]
},
"parameters": {
"resolution": "480P",
"ratio": "adaptive",
"duration": 5,
"prompt_extend": true
}
}'
视频编辑
通过 reference_video 类型传入待编辑视频,结合 prompt 指令编辑视频内容。
curl --location 'https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
-H 'X-DashScope-Async: enable' \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "wan3.0-video",
"input": {
"prompt": "将整个画面转换为黏土风格",
"media": [
{
"type": "reference_video",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260402/ldnfdf/wan2.7-videoedit-style-change.mp4"
}
]
},
"parameters": {
"resolution": "720P",
"prompt_extend": true
}
}'
视频延长
通过 reference_video 类型传入原始视频,结合含延长意图关键词的 prompt 延长视频内容。需将 ratio 设为 adaptive。
curl --location 'https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
-H 'X-DashScope-Async: enable' \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "wan3.0-video",
"input": {
"prompt": "将视频1向后延长,面包师端上刷好的面包,将刷子放到一旁,镜头跟随面包师,去斜后方的烤炉进行烤制",
"media": [
{
"type": "reference_video",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260402/ldnfdf/wan2.7-videoedit-style-change.mp4"
}
]
},
"parameters": {
"resolution": "720P",
"ratio": "adaptive",
"prompt_extend": true
}
}'