リクエストパラメーター リクエストヘッダー (Headers) Content-Type string (必須) リクエストのコンテンツタイプ。必ず application/json にしてください。 Authorization string (必須) Model Studio API キーを使用してリクエストを認証します。例:Bearer sk-xxxx。 X-DashScope-Async string (必須) 非同期処理を有効にします。HTTP リクエストでは非同期呼び出しのみサポートされます。必ず enable にしてください。 重要このリクエストヘッダーが存在しない場合、「current user api does not support synchronous calls」というエラーが返されます。 リクエスト本文 (Request Body) model string (必須) モデル名。固定値:wan3.0-video。 input object (必須) 基本的な入力情報。prompt または media のいずれか一方を提供する必要があります。 プロパティ prompt string (条件付き必須) 目的の動画コンテンツを記述するテキストプロンプト。media またはこのパラメーターのいずれか一方を提供する必要があります。 中国語および英語の両方をサポートします。中国語の各文字または英字は 1 文字としてカウントされ、最大 20,000 文字まで入力可能です。この制限を超えるコンテンツは自動的に切り捨てられます。 リファレンスモードでは、プロンプト内で「Image 1」や「Video 1」などを使用して、media 配列内の対応する順序のメディアアセットを参照できます。 media array (条件付き必須) 画像、動画、音声、ファイル、ウェブページを入力として受け付けるメディアアセット配列。prompt またはこのパラメーターのいずれか一方を提供する必要があります。 プロパティ type string (必須) メディアアセットのタイプ。有効な値:
first_frame:先頭フレーム画像。最大 1 枚。動画の先頭フレームとして厳密に使用されます。
last_frame:末尾フレーム画像。最大 1 枚。動画の末尾フレームとして厳密に使用されます。
reference_image:リファレンス画像。最大 10 枚。
reference_video:リファレンス動画。最大 5 クリップで、合計持続時間は 15 秒以内。
reference_audio:リファレンス音声。最大 5 クリップで、合計持続時間は 15 秒以内。
file:ファイル。最大 1 ファイル。link とは同時に使用できません。
link:ウェブリンク。最大 1 リンク。file とは同時に使用できません。
重要reference_xx/file/link タイプと first_frame/last_frame タイプは相互排他であり、同一リクエスト内で同時に使用することはできません。 url string (必須) メディアアセットの URL または Base64 エンコードデータ。 入力画像 (type=first_frame / last_frame / reference_image) 画像の URL または Base64 エンコードデータ。 画像の制限事項:
- フォーマット:JPEG、JPG、PNG(透明チャンネルはサポートされません)、BMP、WEBP。
- 解像度:各辺 [240、8000] ピクセル。
- 縦横比:最大 8:1。
- ファイルサイズ:最大 20 MB。
サポートされる入力形式:
-
公開 URL:
-
Base64 エンコード画像文字列:
- データ形式:
data:{MIME_type};base64,{base64_data}。
- 例:data:image/png;base64,GDU7MtCZzEbTbmRZ......(エンコードされた文字列は長いため、一部のみ表示)
- 詳細については、「入力画像」をご参照ください。
入力動画 (type=reference_video) リファレンス動画の URL。 動画の制限事項:
- フォーマット:mp4、mov。
- 持続時間:1 クリップあたり [1、15] 秒で、合計持続時間は 15 秒以内。
- フレームレート:≥16 fps。
- 解像度:各辺 [240、4096] ピクセル。
- 縦横比:最大 8:1。
- 1 クリップあたりのファイルサイズ:最大 100 MB。
サポートされる入力形式:
-
公開 URL:
入力音声 (type=reference_audio) リファレンス音声の URL。 音声の制限事項:
- フォーマット:wav、mp3。
- 持続時間:1 クリップあたり [1、15] 秒で、合計持続時間は 15 秒以内。
- ファイルサイズ:最大 15 MB。
サポートされる入力形式:
-
公開 URL:
入力ファイル (type=file) ファイルの URL。 ファイルの制限事項:
- フォーマット:docx、doc、xlsx、xls、pptx、ppt、pdf、txt、key、pages、numbers、md。
- ファイルサイズ:最大 100 MB。
- ページ数制限:最大 50 ページ(pdf、docx、doc、pptx、ppt、key、pages 形式に対して検証済み)。
サポートされる入力形式:
-
公開 URL:
入力ウェブリンク (type=link) 公開ウェブページの URL。ログインを必要としない公開アクセス可能なウェブページ(ニュース、ブログ、公式アカウントなど)の解析のみをサポートします。 サポートされる入力形式:
-
公開 URL:
parameters object (任意) 動画処理パラメーター。 プロパティ resolution string (任意) 生成される動画の解像度レベル。デフォルト値:1080P。有効な値: ratio string (任意) 生成される動画の縦横比。有効な値:
adaptive(デフォルト値):入力メディアの比率および意図に基づいて適切な縦横比を自動推奨するアダプティブ縦横比。
21:9
16:9
4:3
1:1
3:4
9:16
duration integer (任意) 生成される動画の持続時間(秒単位)。デフォルト値:5。
- 動画入力なしの場合:[2、30] の範囲の整数。
- 動画入力ありの場合:入力動画の合計持続時間+出力動画の持続時間が 30 秒を超えてはなりません。
-1 に設定した場合:スマート持続時間モード。モデルが入力プロンプト、コンテンツ、リッチメディアに基づいて適切な持続時間を自動推奨します。
audio boolean (任意) 出力動画に音声を含めるかどうか。
true:デフォルト値。出力動画に音声が含まれます。
false:出力動画に音声トラックが含まれません。
音声の有効化または無効化は課金に影響しません。 seed integer (任意) 乱数シード。生成結果を再現するために使用します。値の範囲:-1または[0、2147483647]。-1を指定するか未指定の場合、システムが自動的にランダムシードを生成します。同じseedを使用しても、毎回同一の結果が生成されるとは限りません。 watermark boolean (任意) ウォーターマークを追加するかどうか。
false:デフォルト値。ウォーターマークは追加されません。
true:ウォーターマークが追加されます。
| ファイルから動画への参照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
}
}'
|