Skip to main content
First & last frames

Wan — Animate from first & last frames

Submit first+last frames

POST
/services/aigc/image2video/video-synthesis
curl --location 'https://dashscope-intl.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"
  }
}
The Wan kf2v model generates a smoothly transitioning video from a first frame image, a last frame image, and a text prompt.

Authorizations

string
header
required

DashScope API Key. Create one in the Qwen Cloud console.

Header Parameters

enum<string>
required

Must be set to enable for asynchronous task submission. Returns an error if not included.

enable

Body

application/json
enum<string>
required

Model name.

wan2.2-kf2v-flash,wan2.1-kf2v-plus
wan2.2-kf2v-flash
object
required

Input data including frame images and optional prompt.

object

Video generation parameters.

Response

200-application/json
string

Unique request identifier for tracing and troubleshooting.

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