Skip to main content

Wan 2.7 - Image to Video

Animate images into video using Alibaba Cloud's Wan 2.7 model. A single multimodal input protocol covers three tasks, selected with promptObject.mode:

  • 🖼️ first_frame - Animate a single image (optional driving audio for lip-sync)
  • 🎬 first_last - Keyframe between a first and a last image
  • 🎞️ continuation - Extend an existing video clip (optional target last frame)

Note: Image, video, and audio files must first be uploaded using the Asset API before processing. The imageUrl, imageTailUrl, videoUrl, and audioUrl parameters should contain the paths returned from the Asset API upload.

Endpoint

Request Headers

FieldValue
API-KEY<api-key>
Content-Typeapplication/json

Request Parameters

Field NameTypeExampleDescriptionRequired
typestringIMAGE_TO_VIDEOFeature identifier✔️
modelstringwan2.7-i2vAI model to use✔️
conversationIdstringIMAGE_TO_VIDEOConversation context✔️
promptObject.promptstringThe camera slowly pans across the room as the cat wakes upText description of the desired motion/scene. Max 5000 characters✔️
promptObject.modestringfirst_frameGeneration mode: first_frame, first_last, or continuation. Determines which media fields below are required — see Mode-Specific Fields✔️
promptObject.imageUrlstringimages/example.jpgS3 path to the first-frame image, from Asset API upload. Required for first_frame and first_last. Cannot be provided together with videoUrlConditional
promptObject.imageTailUrlstringimages/end-frame.jpgS3 path to the last-frame image, from Asset API upload. Required for first_last; optional target last frame for continuation; unused for first_frameConditional
promptObject.videoUrlstringvideos/source-clip.mp4S3 path to the source video clip to extend, from Asset API upload. Required for continuation. Cannot be provided together with imageUrlConditional
promptObject.audioUrlstringaudio/driving-audio.mp3S3 path to a driving audio track, from Asset API upload. Used as a lip-sync/timing source for first_frame and first_last; if omitted, Wan generates matching audio automatically. Ignored for continuation
promptObject.resolutionstring720POutput resolution: 720P or 1080P. Higher resolution costs more credits✔️
promptObject.durationnumber5Video duration in seconds. Integer from 2 to 15. For continuation, the total duration includes the uploaded source clip. Credits are charged per second at the selected resolution✔️
promptObject.prompt_extendbooleantrueEnables prompt rewriting. When enabled, an LLM rewrites the input prompt to improve generation quality
promptObject.negativePromptstringblurry, low qualityText describing what to avoid in the video. Max 500 characters
promptObject.seednumber2026Random seed for reproducible generation. Integer from 0 to 2147483647. Omit for a random result
promptObject.watermarkbooleanfalseWhether to add an AI-generated watermark to the output video

imageUrl and videoUrl are mutually exclusive — a request that sets both is rejected. At least one of imageUrl or videoUrl must be provided.

Mode-Specific Fields

first_frame - Animate a single image

Field NameRequiredNotes
promptObject.imageUrl✔️First frame to animate
promptObject.audioUrlOptional driving audio for lip-sync; auto-generated if omitted

first_last - Keyframe between two images

Field NameRequiredNotes
promptObject.imageUrl✔️First frame
promptObject.imageTailUrl✔️Last frame
promptObject.audioUrlOptional driving audio for lip-sync; auto-generated if omitted

continuation - Extend an existing video clip

Field NameRequiredNotes
promptObject.videoUrl✔️Source clip to extend (2-10s)
promptObject.imageTailUrlOptional target last frame to guide the continuation

Media Requirements

  • Images (imageUrl, imageTailUrl): JPEG, PNG (alpha channel not supported), BMP, or WEBP. Minimum 240x240px. Max 20MB.
  • Video (videoUrl, continuation mode only): MP4 or MOV. 2-10 seconds. Max 100MB. The source clip counts toward the duration total.
  • Audio (audioUrl): WAV or MP3. 2-30 seconds. Max 15MB. If longer than the video duration, only the leading portion is used; if shorter, the remaining video is silent (e.g. 3s audio with a 5s video produces 3s of sound followed by 2s of silence).

Code Examples

curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "IMAGE_TO_VIDEO",
"model": "wan2.7-i2v",
"conversationId": "IMAGE_TO_VIDEO",
"promptObject": {
"mode": "first_frame",
"imageUrl": "images/2026_07_21_test-wan-first-frame.png",
"prompt": "The perspective slowly rotates and zooms out, revealing the softly lit living room and the sleeping cat.",
"resolution": "720P",
"duration": 5,
"prompt_extend": true,
"negativePrompt": "abrupt cut, mismatched lighting"
}
}'

Example: First + Last Frame (Keyframe)

curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "IMAGE_TO_VIDEO",
"model": "wan2.7-i2v",
"conversationId": "IMAGE_TO_VIDEO",
"promptObject": {
"mode": "first_last",
"imageUrl": "images/test-wan-first-frame.png",
"imageTailUrl": "images/test-wan-last-frame.webp",
"prompt": "A dreamlike dissolve effect merges the neon-lit alley with the plush living room, colors shifting from cool blue to warm teal.",
"resolution": "1080P",
"duration": 5,
"seed": 2026,
"prompt_extend": false
}
}'

Example: Video Continuation

curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "IMAGE_TO_VIDEO",
"model": "wan2.7-i2v",
"conversationId": "IMAGE_TO_VIDEO",
"promptObject": {
"mode": "continuation",
"videoUrl": "videos/wan2.7-i2v-video-continuation.mp4",
"prompt": "The man looks down at the wooden box on the ground. He bends over, carefully opens the lid, and stares at the contents.",
"resolution": "1080P",
"duration": 14,
"prompt_extend": true
}
}'

Interactive Playground

API Playground

https://api.1min.ai/api/features
first_frame: animate one image. first_last: keyframe between two images. continuation: extend a video clip
Path to the first-frame image uploaded via Asset API
Optional lip-sync/timing audio uploaded via Asset API (WAV/MP3, 2-30s, up to 15MB)
Video duration in seconds (2-15). For continuation, includes the source clip
Rewrite the prompt with an LLM to improve generation quality
Fixed seed for reproducible generation. Leave empty for random
Add an AI-generated watermark to the output video

Generated cURL Command:

curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "IMAGE_TO_VIDEO",
"model": "wan2.7-i2v",
"conversationId": "IMAGE_TO_VIDEO",
"promptObject": {
"mode": "first_frame",
"imageUrl": "images/2026_07_21_test-wan-first-frame.png",
"prompt": "The perspective slowly rotates and zooms out, revealing the softly lit living room and the sleeping cat.",
"resolution": "720P",
"duration": 5,
"prompt_extend": true
}
}'

Response

{
"aiRecord": {
"uuid": "55a361d6-e126-4643-b928-f64634e278a6",
"userId": "2f57c2a4-1fff-48e7-972f-3c1d6c59bced",
"teamId": "eb48d89f-1bb7-4d82-9b25-481971a0e97a",
"teamUser": {
"teamId": "eb48d89f-1bb7-4d82-9b25-481971a0e97a",
"userId": "2f57c2a4-1fff-48e7-972f-3c1d6c59bced",
"userName": "John",
"userAvatar": "https://lh3.googleusercontent.com/a/ACg8ocLqgsNsHRfmWF9d-E1RvJetVsEzxNOsOg-NXWNTpMxLDPJbwELI=s96-c",
"status": "ACTIVE",
"role": "ADMIN",
"creditLimit": 100000000,
"usedCredit": 17872338,
"createdAt": "2025-11-25T11:04:08.620Z",
"createdBy": "SYSTEM",
"updatedAt": "2025-11-26T09:20:02.221Z",
"updatedBy": "SYSTEM"
},
"model": "wan2.7-i2v",
"type": "IMAGE_TO_VIDEO",
"metadata": {
"credit": 6300000,
"duration": 14,
"resolution": "1080P",
"executionTime": 136.855
},
"rating": null,
"feedback": null,
"conversationId": null,
"status": "SUCCESS",
"createdAt": "2026-07-25T15:50:25.889Z",
"aiRecordDetail": {
"promptObject": {
"mode": "continuation",
"prompt": "The man looks down at the wooden box on the ground. He bends over, carefully opens the lid, and stares at the contents.",
"duration": 14,
"videoUrl": "development/videos/2026_07_25_22_50_09_316_wan2.7-i2v-video-continuation.mp4",
"resolution": "1080P",
"prompt_extend": true
},
"resultObject": [
"development/videos/2026_07_25_22_52_35_715_748807.mp4"
],
"responseObject": {}
},
"additionalData": null,
"temporaryUrl": "https://s3.us-east-1.amazonaws.com/asset.1min.ai/development/videos/2026_07_25_22_52_35_715_748807.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=..."
}
}