跳转到主要内容
万相 2.1

Wan — 创建任务

提交视频编辑任务

POST
/services/aigc/video-generation/video-synthesis
curl --location 'https://dashscope.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": "wanx2.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"
  }
}
该模型支持文本、图片和视频多模态输入,生成编辑后的视频。

鉴权

string
header
必填

千问云 API Key。详见获取 API Key

Header 参数

enum<string>
必填

必须设置为 enable 以创建异步任务。

enable

请求体

application/json
enum<string>
必填

模型名称。

wanx2.1-vace-plus
wanx2.1-vace-plus
object
必填

视频编辑的输入数据,各功能所需字段不同。

object

视频编辑的生成参数,可用参数因功能而异。

响应

200-application/json
string

唯一请求标识符。

object