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
| Field | Value |
|---|---|
| API-KEY | <api-key> |
| Content-Type | application/json |
Request Parameters
| Field Name | Type | Example | Description | Required |
|---|---|---|---|---|
| type | string | IMAGE_TO_VIDEO | Feature identifier | ✔️ |
| model | string | wan2.7-i2v | AI model to use | ✔️ |
| conversationId | string | IMAGE_TO_VIDEO | Conversation context | ✔️ |
| promptObject.prompt | string | The camera slowly pans across the room as the cat wakes up | Text description of the desired motion/scene. Max 5000 characters | ✔️ |
| promptObject.mode | string | first_frame | Generation mode: first_frame, first_last, or continuation. Determines which media fields below are required — see Mode-Specific Fields | ✔️ |
| promptObject.imageUrl | string | images/example.jpg | S3 path to the first-frame image, from Asset API upload. Required for first_frame and first_last. Cannot be provided together with videoUrl | Conditional |
| promptObject.imageTailUrl | string | images/end-frame.jpg | S3 path to the last-frame image, from Asset API upload. Required for first_last; optional target last frame for continuation; unused for first_frame | Conditional |
| promptObject.videoUrl | string | videos/source-clip.mp4 | S3 path to the source video clip to extend, from Asset API upload. Required for continuation. Cannot be provided together with imageUrl | Conditional |
| promptObject.audioUrl | string | audio/driving-audio.mp3 | S3 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.resolution | string | 720P | Output resolution: 720P or 1080P. Higher resolution costs more credits | ✔️ |
| promptObject.duration | number | 5 | Video 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_extend | boolean | true | Enables prompt rewriting. When enabled, an LLM rewrites the input prompt to improve generation quality | ❌ |
| promptObject.negativePrompt | string | blurry, low quality | Text describing what to avoid in the video. Max 500 characters | ❌ |
| promptObject.seed | number | 2026 | Random seed for reproducible generation. Integer from 0 to 2147483647. Omit for a random result | ❌ |
| promptObject.watermark | boolean | false | Whether to add an AI-generated watermark to the output video | ❌ |
imageUrlandvideoUrlare mutually exclusive — a request that sets both is rejected. At least one ofimageUrlorvideoUrlmust be provided.
Mode-Specific Fields
first_frame - Animate a single image
| Field Name | Required | Notes |
|---|---|---|
| promptObject.imageUrl | ✔️ | First frame to animate |
| promptObject.audioUrl | ❌ | Optional driving audio for lip-sync; auto-generated if omitted |
first_last - Keyframe between two images
| Field Name | Required | Notes |
|---|---|---|
| promptObject.imageUrl | ✔️ | First frame |
| promptObject.imageTailUrl | ✔️ | Last frame |
| promptObject.audioUrl | ❌ | Optional driving audio for lip-sync; auto-generated if omitted |
continuation - Extend an existing video clip
| Field Name | Required | Notes |
|---|---|---|
| promptObject.videoUrl | ✔️ | Source clip to extend (2-10s) |
| promptObject.imageTailUrl | ❌ | Optional 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,continuationmode only): MP4 or MOV. 2-10 seconds. Max 100MB. The source clip counts toward thedurationtotal. - 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
- JavaScript
- Python
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"
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
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'
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
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"
}
}
response = requests.post(url, headers=headers, json=data)
Example: First + Last Frame (Keyframe)
- cURL
- JavaScript
- Python
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
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
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
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
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
}
}
response = requests.post(url, headers=headers, json=data)
Example: Video Continuation
- cURL
- JavaScript
- Python
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
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
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
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
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
}
}
response = requests.post(url, headers=headers, json=data)
Interactive Playground
API Playground
https://api.1min.ai/api/featuresfirst_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=..."
}
}