DataEyesAI
Official SiteConsoleDocs Home
Getting StartedDeveloper ToolsAI Models APITerms & Policies
Official SiteConsoleDocs Home
Getting StartedDeveloper ToolsAI Models APITerms & Policies
  1. Wan Video Generation
  • Documentation
    • Getting Started
      • Welcome to DataEyesAI
      • Quickstart
      • API Keys and Authentication
      • Base URL and SDKs
      • Models, Groups, and Pricing
    • Developer Tool Integration
      • Claude Code
      • Claude Code for VS Code
      • Codex
      • OpenClaw
      • OpenCode
      • Cline
      • Gemini CLI
      • Grok CLI
      • n8n
      • AutoClaw
      • Other tools
      • Claude Code 400 troubleshooting
    • AI Models API
      • API Overview
      • Chat Completions
      • Responses
      • Messages (Claude)
      • Gemini (generateContent)
      • Embeddings
      • Image Models
        • Images
        • Gemini Image Generation
        • Grok Imagine Image
      • Midjourney format
        • Midjourney API Reference
        • Task query interface
        • Upload image
        • Get seed (Seed)
        • Submit Imagine task
        • Query tasks based on ID list
        • FaceSwap
        • Execute Action operation
        • /mj/submit/blend
        • Submit Describe task
        • Submit Modal
        • Refresh link
        • Edit image
        • Query task status by task ID
        • Get the seed of the task image
      • Video Model
        • FLUX Video Generation (flux-3-video)
        • Grok Video Generation
          • 00-Overview
          • 01-Text-to-Video
          • 02-Image-to-Video
          • 03-Reference-to-Video
          • 04-Video-Editing
          • 05-Video-Extension
        • Seedance Video Generation
          • 00-Overview
          • 01-Create-Video-Generation-Task
          • 02-Query-Video-Generation-Task
          • 03-Query-Video-Generation-Task-List
          • 04-Cancel-or-Delete-Task
          • Seedance Private Asset Library API Documentation
        • MiniMax-H3 Video Generation
          • 00-Overview
          • 01-Create-Video-Generation
          • 02-Create-Video-Regeneration
          • 03-Create-H3-Context-IR
          • 04-Query-Task
          • 05-List-Tasks
          • 06-Cancel-or-Delete-Task
        • Hailuo Video Generation
          • 00-Overview
          • 01-Text-to-Video-T2V
          • 02-Image-to-Video-I2V
          • 03-First-Last-Frame-FL2V
          • 04-Subject-Reference-S2V
          • 05-Query-Task-Status
          • 06-Video-Download
          • 99-Appendix-Camera-Movement-and-Webhooks
        • Jimeng Video Generation
          • 00-Overview
          • 01-3.0-Pro-Video-Generation
          • 02-720P-Text-to-Video
          • 03-720P-Image-to-Video-First-Frame
          • 04-720P-Image-to-Video-Start-End-Frame
          • 05-720P-Image-to-Video-Camera
          • 06-1080P-Text-to-Video
          • 07-1080P-Image-to-Video-First-Frame
          • 08-1080P-Image-to-Video-Start-End-Frame
          • 09-Error-Codes
        • Kling AI Video Generation
          • 00-Overview
          • 01-Text-to-Video
          • 02-Image-to-Video
          • 03-Omni-Video
          • 04-Multi-Image-to-Video
          • 05-Motion-Control
          • 06-Multi-Elements
          • 07-Video-Extension
          • 08-Lip-Sync
          • 09-Avatar
          • 10-Text-to-Audio
          • 11-Video-to-Audio
          • 12-TTS
          • 13-Custom-Voices
          • 14-Image-Recognition
          • 15-Element-Management
          • 16-Video-Effects
          • 17-Kling-4.0-Video-Generation
        • Vidu Video Generation
          • 00-Overview
          • 01-Text-to-Video
          • 02-Image-to-Video
          • 03-Reference-to-Video
          • 04-Start-End-Frame
          • 05-Multi-Frame
          • 06-Scene-Template
          • 07-Template-Story
          • 08-Query-Tasks
        • HappyHorse
          • HappyHorse Text-to-Video
          • HappyHorse Image-to-Video (First Frame)
          • HappyHorse Reference-to-Video
          • HappyHorse Video Editing
        • Wan Video Generation
          • 00-Overview.md
          • 01-Text-to-Video
          • 02-Image-to-Video
          • 03-Reference-to-Video
          • 04-Video-Editing
          • 05-First-Last-Frame-to-Video
          • 06-Motion-Transfer-and-Character-Swap
          • 07-Digital-Human-Video
          • 08-VACE-Video-Editing
          • 09-Query-Task
      • Audio API
        • Audio API
        • Gemini TTS API
        • Google DeepMind Lyria API
        • Elevenlabs Speech to Text API Reference
    • Search / Reader Product
      • Search & Reader
      • Web Search
      • Search and Read
      • Video Search
      • Web Reader
      • Document Parsing
      • Trending
      • Weather
      • All City ID
    • Advanced & System API
      • FAQ
      • System interface
        • API Key & Quota Query API
        • API Key Management API
      • API Reference​​
        • Error Codes
        • Rate Limits and Billing Rules
      • List models
        • Models
  • Terms & Policies
    • DataEyesAI API Terms of Service
    • DataEyesAI Legal Notice and Privacy Policy
    • DataEyesAI Paid Services Agreement
    • Automatic Renewal Service Rules
  1. Wan Video Generation

05-First-Last-Frame-to-Video

First & Last Frame to Video#

Doc version:v1.0.0 | Last updated:2026-07-22
This platform fully supports the official Tongyi Wanxiang (Wan) video generation API. Requests and responses are transparently proxied; parameter semantics are identical to the official API.
Provide a first frame image and a last frame image, together with a text prompt, to generate a video that transitions smoothly between the two frames (kf2v series). The output video is fixed at 5 seconds, silent, MP4 (H.264 encoded), and exactly 1 video is produced. Tasks usually take 1–5 minutes; only asynchronous invocation is supported (create task → poll for results).

Supported Models#

ModelResolution TiersDefault ResolutionDurationEffect TemplatesDescription
wan2.2-kf2v-flash480P / 720P / 1080P720PFixed 5 seconds—Version 2.2, high cost-effectiveness; query response returns the resolution tier in usage.SR
wanx2.1-kf2v-plus720P only720PFixed 5 secondsSupported (e.g. mech1, hanfu-1)Version 2.1; query response usage.video_ratio is always standard
Resolution and duration directly affect cost: for the same model, 1080P > 720P > 480P; output is billed by the number of seconds of successfully generated video, and failed tasks are not billed.

Create Task#

Note: The submission endpoint for first & last frame to video is image2video, which is different from the video-generation endpoint used for text-to-video / image-to-video.
POST https://studio.dataeyes.ai/ali/api/v1/services/aigc/image2video/video-synthesis

Request Headers#

ParameterTypeRequiredDefaultDescription
Content-TypestringYesapplication/jsonData exchange format
AuthorizationstringYesAuthentication, Bearer {API_KEY}
The X-DashScope-Async: enable header required by the official API is automatically added by the platform — you do not need to include it; including it is also compatible.

Request Body#

ParameterTypeRequiredDefaultDescription
modelstringYesModel name. Options: wan2.2-kf2v-flash, wanx2.1-kf2v-plus
inputobjectYesBasic input information
input.first_frame_urlstringYesFirst frame image. Supports: public URL (HTTP/HTTPS, recommended), Base64 (data:{MIME_type};base64,{base64_data}). The output video aspect ratio is based on this image; see the next section for image requirements
input.last_frame_urlstringNoLast frame image, same input format as above. In the regular first-and-last-frame scenario it is effectively required; ignored when using a template effect. Its resolution may differ from the first frame — no forced alignment is required
input.promptstringNoText prompt, Chinese or English, ≤800 characters, automatically truncated if exceeded. When the subject/scene changes significantly between the first and last frames, it is recommended to describe the transition process (camera moves such as "the camera pans left", subject motion such as "a person running forward")
input.negative_promptstringNoNegative prompt describing content you do not want to appear, Chinese or English, ≤500 characters, automatically truncated if exceeded
input.templatestringNoVideo effect template name (e.g. mech1 Mech Awakening, hanfu-1 Tang-Style Hanfu). Supported model: wanx2.1-kf2v-plus. When used, only first_frame_url is needed; prompt and last_frame_url are ignored. Passing only a last frame together with a template returns an error
parametersobjectNoVideo processing parameters
parameters.resolutionstringNo720PResolution tier. flash: 480P / 720P / 1080P; plus: 720P only. Only adjusts total pixel clarity and does not change the aspect ratio (which follows the first frame). Directly affects cost
parameters.durationintegerNo5Video duration in seconds, fixed at 5, cannot be changed
parameters.prompt_extendboolNotrueWhether to enable intelligent prompt rewriting. Noticeably improves short prompts, but increases processing time
parameters.seedintegerNoRandomRandom seed, range [0, 2147483647]. Fixing the seed improves result reproducibility, but does not guarantee identical output
parameters.watermarkboolNofalseWhether to add a watermark ("AI generated" mark in the bottom-right corner of the video)

Input Image Requirements#

ItemRequirement
Count1 first frame + 1 last frame (effect template mode uses the first frame only)
FormatJPEG, JPG, PNG (alpha channel not supported), BMP, WEBP
ResolutionBoth width and height within [240, 8000] pixels
File size≤10MB
First/last frame relationshipThe last frame's resolution may differ from the first frame's — no forced alignment; the output video aspect ratio is based on the first frame
Output size rule: The model takes the first frame's aspect ratio as the baseline and, combined with the total pixel count of the resolution tier, computes the closest legal resolution; video width and height must be multiples of 16, so slight adjustments occur and a strict ratio cannot be guaranteed. Example: first frame 750×1000 (3:4) + 720P → actual output approximately 816×1104.

Request Example (wan2.2-kf2v-flash)#

curl --request POST \
  --url 'https://studio.dataeyes.ai/ali/api/v1/services/aigc/image2video/video-synthesis' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "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 curiously looks up at the sky, the camera gradually rises from eye level"
    },
    "parameters": {
      "resolution": "480P",
      "prompt_extend": true
    }
  }'

Request Example (wanx2.1-kf2v-plus)#

curl --request POST \
  --url 'https://studio.dataeyes.ai/ali/api/v1/services/aigc/image2video/video-synthesis' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "wanx2.1-kf2v-plus",
    "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": "Petals drifting down in the wind, the camera pulls back from close-up to a wide shot"
    },
    "parameters": {
      "prompt_extend": true
    }
  }'

Response Example#

{
  "output": {
    "task_status": "PENDING",
    "task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx"
  },
  "request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx"
}

Response Fields#

FieldTypeDescription
output.task_idstringTask ID used for polling, valid for 24 hours
output.task_statusstringInitial task status, usually PENDING
request_idstringUnique request identifier
code / messagestringReturned only when creation fails: error code and details (e.g. InvalidParameter for non-conforming image dimensions)

Query Task#

Poll the task status using the task_id returned by the create-task call; once the status is SUCCEEDED, retrieve the video URL from output.video_url (valid for 24 hours).
GET https://studio.dataeyes.ai/ali/api/v1/tasks/{task_id}
See 09-Query-Task for details.
Previous
04-Video-Editing
Next
06-Motion-Transfer-and-Character-Swap