跳转到主要内容
首尾帧

Wan — 创建任务

提交首尾帧图生视频任务

POST
/services/aigc/image2video/video-synthesis
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/video-synthesis' \
  -H 'X-DashScope-Async: enable' \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "wan2.2-kf2v-flash",
  "input": {
    "first_frame_url": "https://wanx.alicdn.com/material/20250318/first_frame.png",
    "last_frame_url": "https://wanx.alicdn.com/material/20250318/last_frame.png",
    "prompt": "Realistic style, a small black cat looks up at the sky curiously, the camera gradually rises from eye level, and finally captures its curious gaze from a top-down view."
  },
  "parameters": {
    "resolution": "480P",
    "prompt_extend": true
  }
}'
{
  "request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx",
  "output": {
    "task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx",
    "task_status": "PENDING"
  }
}
Wan kf2v 模型根据首帧图片尾帧图片文本提示词,生成平滑过渡的视频。

鉴权

string
header
必填

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

Header 参数

enum<string>
必填

异步提交任务时必须设置为 enable,否则返回错误。

enable

请求体

application/json
enum<string>
必填

模型名称。

wan2.2-kf2v-flash,wan2.1-kf2v-plus
wan2.2-kf2v-flash
object
必填

输入数据,包含首尾帧图像和可选提示词。

object

视频生成参数。

响应

200-application/json
string

请求的唯一标识符,用于追踪和排查问题。

4909100c-7b5a-9f92-bfe5-xxxxxx
object