DataEyesAI
Official SiteConsoleDocs Home
Getting StartedDeveloper ToolsAI Models API
Official SiteConsoleDocs Home
Getting StartedDeveloper ToolsAI Models API
  1. Wan Video Generation
  • Getting Started
    • Overview
    • Console (Getting Started)
    • API Key
    • Base URL
  • Developer Tool Integration
    • OpenClaw
    • Claude Code
    • Codex
    • Gemini CLI
    • Grok CLI
    • Other Tools
  • AI Models API
    • OpenAI format (supports major original models)
      • Chat (Response)
        • Create Network Search
        • Create Model Response GPT-5 Enable Thinking
        • Create Function Call
        • Create Model Response
        • Create Model Response (Streaming Return)
        • Create Model Response (Control Thinking Length)
      • ChatGPT Interface
        • Audio
          • Audio to text gpt-4o-transcribe
          • GPT-4o-audio
          • Audio to text whisper-1
          • Audio to text gpt-4o-transcribe
          • Create voice gpt-4o-mini-tts
        • Chat
          • Create chat-based image recognition (non-streaming)
          • Create chat-based image recognition (streaming)
          • Create chat-based image recognition (streaming) best64
          • Official N test
          • Create structured output
          • Control the effort level of the inference model
          • Create chat function call
          • deepseek-ocr recognition
          • Create chat completion (non-stream)
        • Completions
          • ChatGPT automatic completion
          • Create completion
      • Image
        • Edit image
        • Create chat completion (streaming)
        • Create chat completion (qwen-mt-turbo)
        • Create chat completion with deepseek v3.1 level of reasoning (streaming)
      • Audio
        • Speech recognition
        • Speech synthesis
        • Official Function Calling invocation
        • Create chat-generated images (non-streaming)
      • Embedding
        • Text embeddings
    • Anthropic format
      • Chat
      • Chat(prompt cache)
      • Streaming response
      • Chat (deep reasoning)
      • Tool invocation (function call)
      • Analyze image
    • Google Gemini interface
      • Native format
        • Text-to-image + control over aspect ratio + clarity
        • Generate image
        • Text generation
        • Text generation - stream
        • Text generation + reasoning - stream
        • Image generation
        • Formatted output
        • Function call
        • Document understanding
        • URL context [native format]
        • Code execution
        • Video understanding
        • URL context
        • Video understanding - url [native format]
        • Imagen 4
        • Audio understanding
        • Embeddings
        • Chat
        • Edit image
      • Image-to-image Base64 request method
        • Multi-image fusion slice generation with gemini-3-pro-image-preview, controlling aspect ratio and clarity
        • Image editing
        • Single image gemini-3-pro-image-preview, controlling aspect ratio and clarity.
        • Image generation( gemini-2.5-flash-image)
        • Image generation gemini-2.5-flash-image, controlling aspect ratio.
        • Image understanding
      • Image-to-image URL request returns URL request format OpenAI
        • Single image generation with gemini-3-pro-image-preview, controlling aspect ratio and clarity.
        • Multi-image fusion slice generation with gemini-3-pro-image-preview, controlling aspect ratio and clarity.
        • Image understanding
    • NanoBanana
      • OpenAI request
        • Edit image
        • OpenAI image format
      • Gemini request
        • Generate image
        • Edit 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
    • Doubao - Painting
      • doubao-seededit-3-0-i2i-250628
      • doubao-seedream-4-0-250828 - text-to-image
      • doubao-seedream-4-0-250828 - image-to-image
      • doubao-seedream-4-0-250828 - multi-image generation
    • Rerank Reordering Model
      • Rerank
    • Video Model
      • 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
      • 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
      • Text-to-Music Suno
        • Task Submission
          • Generate Song (Inspiration Mode)
          • Generate Song (Custom Mode)
          • Generate Song (Continuation Mode)
          • Generate Song (Singer Style)
          • Generate Song (Secondary Creation from Uploaded Song)
          • Generate Song (Song Stitching)
          • Generate Lyrics
          • Song Stitching
        • Query Interface
          • Batch Retrieve Tasks
          • Query Single Task
  • Search / Reader Product
    • Web Reader API​​
      • Web Reader API
      • Web Reader API(HK)
    • Web Search API​​
      • Modal Card API
        • Weather
          • All City ID
          • Weather Query API
      • Web Search API
      • Video Search api
      • Trending Search API
    • Document OCR Parsing API
      • fiel upload
      • URL Parsing
  • Advanced & System API
    • Data Updates
    • System interface
      • API Key & Quota Query API
      • API Key Management API
    • API Reference​​
      • Error Codes
      • HTTP Notes
    • List models
      • Models
  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://platform.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://platform.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://platform.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://platform.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