ファイルから動画への参照
file タイプでファイルを渡すと、モデルが自動的にファイルの内容を理解して動画を生成します。
curl --location 'https://{WorkspaceId}.ap-southeast-1.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": "A high-end smart glasses product advertisement with a minimalist, futuristic, and fashionable style. The color palette features black, silver-gray, and ice-blue tones with subtle white light accents and parameter UI graphics. Opening in pure black background, a pair of smart glasses slowly emerges from darkness with refined highlights on the temple edges. The camera captures ultra-close details of lenses, nose pads, hinges, temples, and material textures, showcasing metal and high-performance composite materials. The product then rotates slowly in mid-air with minimalist motion graphics displaying core parameters. Then the camera pulls back as all parts precisely reassemble into the complete product, transitioning to a young model wearing demonstration in minimalist spaces and urban lighting environments.",
"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
}
}'
リファレンスベース動画生成
input.media にリファレンス画像、動画、音声、ファイル、またはウェブリンクを渡すと、モデルが自動的に意図を理解して動画を生成します。
curl --location 'https://{WorkspaceId}.ap-southeast-1.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": "Video 1 holds Image 3 and plays a soothing country folk song on the chair in Image 4, saying: '\''The sunshine is so nice today.'\'' Image 1 holds Image 2, passes by Video 1, places Image 2 on the table next to Video 1, and says: '\''That sounds beautiful, can you sing it again?'\''",
"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 のみを使用して動画を生成し、メディアファイルは一切渡しません。
curl --location 'https://{WorkspaceId}.ap-southeast-1.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": "A kitten running on a rooftop under the moonlight, neon lights of the city flickering in the distance, cinematic quality, smooth camera movement."
},
"parameters": {
"resolution": "480P",
"ratio": "adaptive",
"duration": 5
}
}'
先頭フレームから動画生成
first_frame を使用して、動画の先頭フレーム画像を厳密に指定します。
curl --location 'https://{WorkspaceId}.ap-southeast-1.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": "An urban fantasy art scene. A dynamic graffiti art character. A spray-painted teenager coming to life from a concrete wall. He raps at an extremely fast pace while striking a classic, energetic rapper pose. The scene is set under a railway bridge at night with an urban vibe. Lighting comes from a solitary streetlamp, creating a cinematic atmosphere full of high energy and stunning detail. The audio of the video consists entirely of rap, with no other dialogue or noise.",
"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
}
}'
先頭・末尾フレームから動画生成
first_frame および last_frame の両方を渡して、動画の先頭フレームおよび末尾フレーム画像を厳密に指定します。
curl --location 'https://{WorkspaceId}.ap-southeast-1.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": "A young girl gradually transitions from a smile to laughter, the camera slowly pushing in, background lighting shifting from cool to warm tones.",
"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
}
}'