Generate smooth dynamic videos using the Tongyi Wanxiang Wan2.2 keyframe-to-video model (wan2.2-kf2v-flash) by simply providing first and last frame images with a prompt, with support for effects templates
Please use your API Token for authentication
Task parameters
First frame image URL (required) Supports public URL (HTTP/HTTPS) or Base64 encoding Image format: JPEG, JPG, PNG (no transparency), BMP, WEBP Image resolution: Width and height range [360, 2000] pixels File size: max 10MB Output video aspect ratio will be based on this image
Last frame image URL (optional) Same requirements as first frame, resolution can differ from first frame Not required when using effects template (template)
Model name (optional, recommended to leave empty) When empty, uses the latest model version, future upgrades will apply automatically Current default: wan2.2-kf2v-flash
wan2.2-kf2v-flash Negative prompt (optional, max 500 characters) Describe content you don't want to see in the video
500Text prompt (optional, max 800 characters) Describe the elements and visual features you want in the generated video When first and last frames have significant subject/scene changes, describe the transition process (e.g., camera movement, subject motion)
800Whether to enable smart prompt rewriting (optional, default true) When enabled, uses a large model to intelligently rewrite the input prompt
Resolution tier (optional, default 720P) wan2.2-kf2v-flash: Available values 480P, 720P, 1080P
480P, 720P, 1080P Random seed (optional, range 0-2147483647)
0 <= x <= 2147483647Video effects template name (optional) When using this parameter, only first_frame_url is needed Different models support different effects templates
Whether to add watermark (optional, default false) Watermark is placed in the bottom-right corner with fixed text "AI Generated"
OK
Task ID
"01234567-89ab-cdef-0123-456789abcdef"