curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
--header 'X-DashScope-Async: enable' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.1-vace-plus",
"input": {
"function": "image_reference",
"prompt": "In the video, a girl gracefully walks out from a misty, ancient forest. Her steps are light, and the camera captures her every nimble moment. When she stops and looks around at the lush woods, a smile of surprise and joy blossoms on her face. This scene, frozen in a moment of interplay between light and shadow, records her wonderful encounter with nature.",
"ref_images_url": [
"http://wanx.alicdn.com/material/20250318/image_reference_2_5_16.png",
"http://wanx.alicdn.com/material/20250318/image_reference_1_5_16.png"
]
},
"parameters": {
"prompt_extend": true,
"obj_or_bg": ["obj","bg"],
"size": "1280*720"
}
}'{
"request_id": "<string>",
"output": {
"task_id": "<string>",
"task_status": "PENDING"
}
}Authorizations
DashScope API Key. Create one in the Qwen Cloud console.
Header Parameters
Must be enable to create an asynchronous task.
Body
application/jsonModel name.
Input data for video editing. Required fields vary by function.
Show child attributes
Show child attributes
The video editing capability to use.
Text description of the desired video content.
Array of reference image URLs. Used by image_reference (1-3 images) and optionally by video_repainting and video_edit (1 image to replace subject).
[
"http://wanx.alicdn.com/material/20250318/image_reference_2_5_16.png",
"http://wanx.alicdn.com/material/20250318/image_reference_1_5_16.png"
]URL of the input video. Required for video_repainting, video_edit, and video_outpainting. Must be MP4 format, no larger than 50 MB, and no longer than 5 seconds.
URL of a mask image for video_edit. White areas are edited; black areas remain unchanged. Specify either this or mask_video_url.
URL of a mask video for video_edit. Specify either this or mask_image_url. Using mask_image_url is recommended.
For video_edit with mask_image_url: specifies which video frame the mask corresponds to. Default: first frame (0).
For video_extension: URL of the first video clip (3 seconds or shorter). The model generates the rest of the video based on this clip.
For video_extension: URL of the last video clip (3 seconds or shorter). The model generates the preceding content.
For video_extension: URL of the first frame image. The video extends forward from this frame.
For video_extension: URL of the last frame image. Generation proceeds backward from this frame.
Generation parameters for video editing. Available parameters vary by function.
Show child attributes
Show child attributes
Enable prompt rewriting. true (default): model optimizes your prompt. false: use your prompt as-is. We recommend disabling this for video_repainting.
Output resolution as width*height. Used by image_reference and video_edit.
For image_reference: identifies each reference image as a subject (obj) or background (bg). Array length must match ref_images_url length.
[
"obj",
"bg"
]For video_repainting: video feature extraction method. Determines which features from the original video are retained.
For video_repainting: controls feature extraction strength. Higher values make the output more similar to the original; lower values allow more creative freedom.
For video_edit: specifies the behavior of the editing area. tracking (default): the editing area automatically follows the target's motion. fixed: the editing area stays in a fixed position.
For video_edit with mask_type: tracking: the ratio by which the mask area expands outward. Lower values fit the target more closely; higher values expand the mask area.
For video_outpainting: upward expansion ratio. Setting to 1.5 expands the top to 1.5 times original height.
For video_outpainting: downward expansion ratio.
For video_outpainting: leftward expansion ratio.
For video_outpainting: rightward expansion ratio.