GuideVideo GenerationWan

Image-to-Video

Wan image-to-video API guide: turn a reference image and prompt into cinematic video with wan2.6-i2v-flash, covering request parameters and prompt tips.

(Wan Video Generation)

Create video generation tasks with natural lighting and a cinematic feel from a single reference image and a descriptive text, based on the Wan model series.


Quick Start

Video generation is asynchronous. The whole flow takes three steps:

1. Submit the task → get a task_id
2. Poll the status → wait for status to become completed and return a public URL

📌 Basics

  • Endpoint: POST /v1/video/generations
  • Authentication: Bearer Token (Authorization: Bearer sk-xxxxxx)
  • Content type: application/json

📥 Request Parameters (Request Body)

ParameterTypeRequiredDescription
modelstringYesModel name, e.g. wan2.6-i2v-flash.
promptstringYesText description of the video content and motion (e.g. "A kitten running on the grass").
input_referencestringYesReference image URL. The video is generated using this image as the visual baseline.
durationintegerYesVideo duration in seconds, e.g. 5.

📤 Response

Status code: 200 OK (task created)

FieldTypeDescription
idstringUnique task ID.
task_idstringTask ID (used for later status queries).
objectstringObject type, always video.
modelstringModel actually used.
statusstringInitial task status, e.g. queued.
progressintegerCurrent progress (0-100).
created_atintegerUnix timestamp when the task was created.

📝 Request Example (JSON)

{
"model": "wan2.6-i2v-flash",
"prompt": "A kitten running on the grass, cinematic, natural lighting",
"input_reference": "https://images.unsplash.com/photo-1514888286974-6c03e2ca1dba?w=1024",
"duration": 5
}

📝 Response Example

{
"id": "task_xGOhEWZIx3qiVkqL7rCE0np45eaTM2HA",
"task_id": "task_xGOhEWZIx3qiVkqL7rCE0np45eaTM2HA",
"object": "video",
"model": "wan2.6-i2v-flash",
"status": "queued",
"progress": 0,
"created_at": 1775026176
}

💡 Developer Tips

  1. Reference image quality: The quality of the input_reference image directly determines the visual ceiling of the video. Use high-resolution images with clear composition.
  2. Asynchronous queries: This endpoint creates an asynchronous task. Record the returned task_id and poll for results with the "Get Video Generation Task Status" endpoint, or wait for the callback notification.
  3. Writing prompts: In image-to-video mode, the prompt should focus on describing motion changes of the elements in the image and the atmosphere, rather than re-describing the static objects already present.
  4. Test environment: The current configuration points to the test server http://192.168.5.29:4000; switch to the production domain for production calls.

On this page