The Wan 2.7 image-to-video model uses multimodal input (text, image, audio, and video) to perform three main tasks: first-frame video generation, first-and-last-frame video generation, and video continuation (continuing from an initial video segment, with or without a final frame) .
- Basic settings: Supports video durations from 2 to 15 seconds, configurable video resolution (720p or 1080p), intelligent prompt rewriting, and watermarking.
- Audio capabilities: Supports automatic dubbing or custom audio upload, ensuring audio-visual synchronization.
- Multi-shot narrative: Lets you generate videos with multiple shots, maintaining subject consistency between shots.
Quick start
| Input prompt | Input first video clip (2 s) | Input last frame image | Output video (12 s, 10 s continuation) |
| A man looks down at a wooden box on the ground. He bends over and carefully opens the lid. He stares at the contents of the box, his lips trembling and slightly parted. His brow is furrowed and his eyes are wide with a look of horror. | ![]() |
- Python SDK
- Java SDK
- Curl
The video_url is valid for 24 hours. Download the video promptly.
Usage notes
- Supported models vary by region. Resources are isolated between regions. For supported models in each region, see the Model Studio console.
- When making a call, make sure your model, endpoint URL, and API key all belong to the same region. Cross-region calls fail.
The sample code in this topic is for the Singapore region.
Core capabilities
First-frame video generation
Supported models: wan2.7 series models.
Parameter settings: The type field in the media array supports the following two combinations. See Input assets for details on media asset combinations.
- First frame: Set
typetofirst_frame. The model automatically adds audio to the video. - First frame + audio: Set
typetofirst_frameanddriving_audio. The model uses the audio to drive video generation for features like lip-syncing and action timing.
| Prompt | First frame image | Output video |
| An urban fantasy art scene. A dynamic graffiti art character. A boy made of spray paint comes to life from a concrete wall. He raps an English song at high speed while striking a classic, energetic rapper pose. The scene is set at night under an urban railway bridge. The light comes from a single street lamp, creating a cinematic atmosphere full of high energy and amazing detail. The audio of the video consists entirely of the rap, with no other dialogue or noise. | ![]() |
- Python SDK
- Java SDK
- Curl
Ensure that your DashScope Python SDK version is 1.25.16 or later. To update, refer to Install the SDK.
The video_url is valid for 24 hours. Download the video promptly.
First and last frame video generation
Supported models: wan2.7 series models.
Parameter settings: The type field in the media array supports the following two combinations. See Input assets for details on media asset combinations.
- First frame + last frame: Set
typetofirst_frameandlast_frame. The model automatically adds audio to the video. - First frame + last frame + audio: Set
typetofirst_frame,last_frame, anddriving_audio. The model uses the audio to drive video generation.
| Prompt | First frame image | Last frame image | Output video |
| In the early morning as the sun rises, a small pumpkin with dewdrops sits in a pumpkin patch. Suddenly, the pumpkin cracks open with a "CRACK". A golden light emanates from the fissure as the pumpkin splits apart, releasing a puff of white mist. A small rabbit appears in the center of the opened pumpkin. | ![]() | ![]() |
- Python SDK
- Java SDK
- Curl
Ensure that your DashScope Python SDK version is 1.25.16 or later. To update, refer to Install the SDK.
Video continuation
Supported models: wan2.7 series models.
This feature continues the content of an input video clip. The output includes the original clip, and its duration counts toward the total generation time. For example, if you input a 2-second video and set the total output duration to 12 seconds, the final video will be 12 seconds long (the original 2-second clip plus a 10-second continuation).
Parameter settings: The type field in the media array supports the following two combinations. See Input assets for details on media asset combinations.
- First video clip: Set
typetofirst_clipto continue the video. - First video clip + last frame continuation: Set
typetofirst_clipandlast_frame. This continues the first video clip and ensures its final frame matches the provided last frame.
- First clip continuation
- First clip and last frame
| Prompt | First video clip | Output video |
| The baker brings over the glazed bread, sets the brush aside, and the camera follows him to the oven at the back to bake it. The baker closes the oven door, stands beside it watching the bread, smells the aroma, and says, "so good". |
- Python SDK
- Java SDK
- Curl
Ensure that your DashScope Python SDK version is 1.25.16 or later. To update, refer to Install the SDK.
Input media
Pass media assets in the media array, where each element must specify a type and a url, and each type can appear at most once in the media array.
Only the specific media combinations listed below are supported. Any other combination returns an error.
Input images
-
Number of images: You can submit a maximum of one image each for the first frame (
type=first_frame) and the last frame (type=last_frame). -
Input methods:
- Public URL: Supports HTTP and HTTPS protocols. Example: https://xxxx/xxx.png.
-
base64-encoded string: A string in the format
data:{MIME_type};base64,{base64_data}, where:- {base64_data}: The Base64-encoded string for the image.
-
{MIME_type}: The MIME type of the image, which must match the file format.
Format
MIME type
JPEG
image/jpeg
JPG
image/jpeg
PNG
image/png
BMP
image/bmp
WEBP
image/webp
Input audio
-
Number of audio files: You can provide a maximum of one audio file (
type=driving_audio). -
Input methods:
- Public URL: Supports HTTP and HTTPS protocols. Example: https://xxxx/xxx.mp3.
Input video
-
Number of videos: You can pass in a maximum of 1 first video clip (
type=first_clip). -
Input methods:
- Public URL: Supports HTTP and HTTPS protocols. Example: https://xxxx/xxx.mp4.
Output video
- Number of videos: 1.
- Output video specifications: Supported specifications vary by model. For details, see Availability.
- Output video URL expiration: 24 hours.
-
Output video dimensions: The model determines the dimensions based on the input first frame or first video clip and the
resolutionsetting. The model preserves the original aspect ratio of the input media. It scales the total pixel count to approximate the target set by theresolutionparameter, and adjusts the width and height to be multiples of 16.
Billing and rate limit
- See Model pricing for details on the free quota and pricing.
- See Wan for details on the rate limit.
-
Billing details:
- Inputs are free. Outputs are billed based on the duration in seconds of each successfully generated video.
- Failed calls or processing errors do not incur fees or consume the free quota for new users.
- The image-to-video feature also supports Savings Plans.
API reference
Wan2.7-I2V API reference
FAQ
Q: What's new in wan2.7-i2v?
A: wan2.7-i2v introduces the following new capabilities compared to wan2.6-i2v and earlier models:
- It supports three primary tasks: first-frame video generation, first-and-last-frame video generation, and video continuation. Earlier models only supported first-frame video generation.
- You can pass multimodal media, such as images, audio, and videos, using the unified
mediaarray. Earlier models only supported passing images with theimg_urlparameter.
Q: How to create a multi-shot video?
A: Specify the shot structure in the prompt. You can use the following methods:
- Direct specification: Include "generate a multi-shot video" in the
prompt. - Storyboard or timestamps: Describe each shot with a time range. For example, "First shot: wide shot, a boy raps and dances" or "First shot [1-5s]: wide shot, a boy raps and dances. Second shot [6-10s]: camera cuts to the cheering audience."
- If you do not explicitly specify the shot structure, the model infers it from the
prompt.
Q: Why can't I set the video aspect ratio?
A: The API does not currently support setting the aspect ratio directly. Instead, you must set the resolution using the resolution parameter.
The resolution parameter controls the total pixel count of the video, not a fixed aspect ratio. The model preserves the approximate original aspect ratio of the input first frame or first video clip and fine-tunes the width and height to be integer multiples of 16 for video encoding.


