Wan2.7
Wan2.7 is Alibaba's next-generation multimodal video model supporting text-to-video, image-to-video, reference-to-video, and video editing. It features multi-shot storytelling, subject-consistent multi-character generation, first-and-last-frame interpolation, video continuation, style transfer, instruction-based editing, and audio-conditioned generation with auto-dubbing. Output at 720p or 1080p, 30 FPS in multiple aspect ratios.
API Options
Platform-level options for task execution and delivery.
-
taskType
string required value: videoInference -
Identifier for the type of task being performed
-
taskUUID
string required UUID v4 -
UUID v4 identifier for tracking tasks and matching async responses. Must be unique per task.
-
outputType
string default: URL -
Video output type.
Allowed values 1 value
-
outputFormat
string default: MP4 -
Specifies the file format of the generated output. The available values depend on the task type and the specific model's capabilities.
- `MP4`: Widely supported video container (H.264), recommended for general use.
- `WEBM`: Optimized for web delivery.
- `MOV`: QuickTime format, common in professional workflows (Apple ecosystem).
Allowed values 3 values
-
outputQuality
integer min: 20 max: 99 default: 95 -
Compression quality of the output. Higher values preserve quality but increase file size.
-
webhookURL
string URI -
Specifies a webhook URL where JSON responses will be sent via HTTP POST when generation tasks complete. For batch requests with multiple results, each completed item triggers a separate webhook call as it becomes available.
Learn more 1 resource
- Webhooks PLATFORM
- Webhooks
-
deliveryMethod
string default: async -
Determines how the API delivers task results.
Allowed values 1 value
- Returns an immediate acknowledgment with the task UUID. Poll for results using getResponse. Required for long-running tasks like video generation.
Learn more 1 resource
- Task Polling PLATFORM
-
uploadEndpoint
string URI -
Specifies a URL where the generated content will be automatically uploaded using the HTTP PUT method. The raw binary data of the media file is sent directly as the request body. For secure uploads to cloud storage, use presigned URLs that include temporary authentication credentials.
Common use cases:
- Cloud storage: Upload directly to S3 buckets, Google Cloud Storage, or Azure Blob Storage using presigned URLs.
- CDN integration: Upload to content delivery networks for immediate distribution.
// S3 presigned URL for secure upload https://your-bucket.s3.amazonaws.com/generated/content.mp4?X-Amz-Signature=abc123&X-Amz-Expires=3600 // Google Cloud Storage presigned URL https://storage.googleapis.com/your-bucket/content.jpg?X-Goog-Signature=xyz789 // Custom storage endpoint https://storage.example.com/uploads/generated-image.jpgThe content data will be sent as the request body to the specified URL when generation is complete.
-
safety
object -
Content safety checking configuration for video generation.
Properties 2 properties
-
safety»checkContentcheckContent
boolean default: false -
Enable or disable content safety checking. When enabled, defaults to
fastmode.
-
safety»modemode
string default: none -
Safety checking mode for video generation.
Allowed values 3 values
- Disables checking.
- Checks key frames.
- Checks all frames.
-
-
ttl
integer min: 60 -
Time-to-live (TTL) in seconds for generated content. Only applies when
outputTypeisURL.
-
includeCost
boolean default: false -
Include task cost in the response.
-
numberResults
integer min: 1 max: 4 default: 1 -
Number of results to generate. Each result uses a different seed, producing variations of the same parameters.
Inputs
Input resources for the task (images, audio, etc). These must be nested inside the inputs object.
inputs object.-
inputs»referenceImagesreferenceImages
array of strings min items: 1 -
List of reference images (UUID, URL, Data URI, or Base64).
-
inputs»frameImagesframeImages
array of strings or objects min items: 1max items: 2 -
An array of frame-specific image inputs to guide video generation. Each item can be either a plain image input (UUID, URL, Data URI, or Base64) or an object that pairs an image with a target frame position.
The
frameImagesparameter allows you to constrain specific frames within the video sequence, ensuring that particular visual content appears at designated points. This is different fromreferenceImages, which provide overall visual guidance without constraining specific timeline positions.When the
frameparameter is omitted, automatic distribution rules apply:- 1 image: Used as the first frame.
- 2 images: First and last frames.
Examples 3 examples
Shorthand format: When you don't need to specify a frame position, you can pass a plain image input directly.
"frameImages": [ "aac49721-1964-481a-ae78-8a4e29b91402" ]Object format: When you need to specify a frame position, use an object with
imageandframe.First and last frames: With two images, they automatically become the first and last frames of the video sequence. You can mix shorthand and object formats."frameImages": [ { "image": "aac49721-1964-481a-ae78-8a4e29b91402", "frame": "first" } ]"frameImages": [ "aac49721-1964-481a-ae78-8a4e29b91402", { "image": "3ad204c3-a9de-4963-8a1a-c3911e3afafe", "frame": "last" } ]Format 1: string[]
-
Image input (UUID, URL, Data URI, or Base64).
Format 2: object[] 2 properties
-
inputs»frameImages»imageimage
string required -
Image input (UUID, URL, Data URI, or Base64).
-
inputs»frameImages»frameframe
object -
Target frame position for the image. Supports first and last frame.
Allowed values 4 values
- First frame of the video.
- Last frame of the video.
- Frame index 0 (first frame).
- Frame index -1 (last frame).
-
inputs»referenceVideosreferenceVideos
array of strings min items: 1 -
List of reference videos (UUID, URL).
-
inputs»audioaudio
string -
Audio input (UUID or URL).
Generation Parameters
Core parameters for controlling the generated content.
-
model
string required value: alibaba:wan@2.7 -
Identifier of the model to use for generation.
Learn more 3 resources
-
positivePrompt
string required* max: 5000 -
Text prompt describing elements to include in the generated output.
Learn more 2 resources
-
negativePrompt
string max: 500 -
Prompt to guide what to exclude from generation. Ignored when guidance is disabled (CFGScale ≤ 1).
Learn more 1 resource
-
Width of the generated media in pixels.
Learn more 2 resources
-
Height of the generated media in pixels.
Learn more 2 resources
-
resolution
string default: 1080p -
Resolution preset for the output. When used with input media, automatically matches the aspect ratio from the input.
Allowed values 2 values
-
duration
integer min: 2 max: 15 default: 5 -
Length of the generated video in seconds. The total number of frames produced is determined by duration multiplied by the model's frame rate (fps).
-
seed
integer min: 0 max: 2147483647 -
Random seed for reproducible generation. When not provided, a random seed is generated in the unsigned 32-bit range.
Settings
Technical parameters to fine-tune the inference process. These must be nested inside the settings object.
settings object.-
settings»audioaudio
boolean default: true -
Generate native audio aligned with visual content.
-
settings»promptEnhancerpromptEnhancer
boolean default: true -
Enable LLM-based prompt rewriting to expand and clarify inputs. Affects reproducibility.
-
settings»shotTypeshotType
string default: single -
Shot composition style.
Allowed values 2 values
- Continuous shot without transitions.
- Multiple shots with transitions.
Frosted Railway Balloon Ascent
{
"taskType": "videoInference",
"taskUUID": "0d84f171-2e54-4c07-836e-05788795736d",
"model": "alibaba:wan@2.7",
"positivePrompt": "Using the reference image as the main visual anchor, animate a gentle departure scene: steam rolls across the platform, the balloon ropes tighten and flutter, the child in the cobalt coat steps forward and looks up, porters adjust luggage, the locomotive releases a soft burst of vapor, then the balloon lifts slowly into the air as the camera rises with it, revealing snowy pine ridges and a glowing dawn horizon. Preserve the character design, wardrobe, and overall composition from the reference. Realistic motion, cinematic depth, crisp cold atmosphere, delicate fabric movement, drifting snow powder, warm brass details against icy surroundings, elegant and emotional travel mood.",
"negativePrompt": "low detail, distorted anatomy, extra limbs, duplicate people, flicker, jitter, warped face, text, watermark, oversaturated, chaotic motion, blurry subject",
"width": 1280,
"height": 720,
"duration": 8,
"seed": 9669,
"settings": {
"audio": true
},
"inputs": {
"referenceImages": [
"https://assets.runware.ai/assets/inputs/41851527-3df1-41c9-a39b-a0d358186d9f.jpg"
]
}
}{
"taskType": "videoInference",
"taskUUID": "0d84f171-2e54-4c07-836e-05788795736d",
"videoUUID": "9b2d1445-99ad-40ca-9adc-2dc6786df569",
"videoURL": "https://vm.runware.ai/video/os/a07d11/ws/5/vi/9b2d1445-99ad-40ca-9adc-2dc6786df569.mp4",
"seed": 9669,
"cost": 0.8034
}Volcanic Violinist Arrival Sequence
{
"taskType": "videoInference",
"taskUUID": "6365139d-4dd0-4170-8ed3-846c47078f07",
"model": "alibaba:wan@2.7",
"positivePrompt": "Create a smooth cinematic transition between the two keyed frames. Begin with a quiet wide shot of the lone violinist on the black-sand volcanic coast, sea mist curling around basalt rocks. The camera slowly advances as the character walks forward with calm determination, coat moving in the wind. Steam rises from fissures, ash drifts lightly, the sky warms from pale dawn to fiery evening. Midway, the terrain becomes more active with glowing cracks and airborne embers. End beside a vivid lava river as the same violinist opens into an expressive performance, with dynamic bow movement, heat shimmer, rich reflections, and a grand natural crescendo. Strong continuity of face, clothing, and instrument, realistic cinematic lighting, epic atmosphere.",
"negativePrompt": "extra people, duplicated limbs, distorted violin, flicker, abrupt cuts, low detail, text, watermark, logo, cartoon, oversaturated face",
"width": 1280,
"height": 720,
"duration": 8,
"seed": 92921,
"settings": {
"audio": true
},
"inputs": {
"frameImages": [
{
"image": "https://assets.runware.ai/assets/inputs/929011ca-1575-4796-b356-6fd1e40978b0.jpg",
"frame": "first"
},
{
"image": "https://assets.runware.ai/assets/inputs/c8567fec-2baa-4eec-9060-50f0d6bb3a5d.jpg",
"frame": "last"
}
]
}
}{
"taskType": "videoInference",
"taskUUID": "6365139d-4dd0-4170-8ed3-846c47078f07",
"videoUUID": "2c911a80-d64c-4060-84c0-fa0a4dd8b549",
"videoURL": "https://vm.runware.ai/video/os/a16d07/ws/5/vi/2c911a80-d64c-4060-84c0-fa0a4dd8b549.mp4",
"seed": 92921,
"cost": 0.808
}Glacial Caravan on Mirrorplain
{
"taskType": "videoInference",
"taskUUID": "7d0bd235-600c-4d6b-92e9-4dad8671de30",
"model": "alibaba:wan@2.7",
"positivePrompt": "Using the reference image as the primary visual anchor, create a sweeping cinematic video of a caravan traversing an immense frozen mirrorplain at dawn. Keep the travelers, pack beasts, costume palette, and cargo design consistent with the reference. Begin with a low wide establishing view showing crisp reflections across the ice, then gently drift sideways as the lead beast exhales visible vapor and cloth streamers flutter in the wind. Subtle cracks of frost skate beneath hooves without danger, tiny snow grains slide across the surface, and far ice ridges shimmer in the early light. Transition into a closer pass alongside the caravan, revealing braided ropes, carved bone ornaments, and painted reed bundles swaying with motion. Finish with the group moving toward a bright horizon while the sky warms from pale peach to silver-gold, emphasizing scale, texture, realism, and calm wonder.",
"negativePrompt": "low detail, jittery motion, duplicated subjects, deformed anatomy, extra limbs, blurry faces, cartoon style, oversaturated colors, heavy fog obscuring subjects, chaotic camera moves, text, watermark",
"width": 1920,
"height": 1080,
"duration": 8,
"seed": 60086,
"settings": {
"audio": true
},
"inputs": {
"referenceImages": [
"https://assets.runware.ai/assets/inputs/c6c6a1ad-2e2c-48e2-82d4-9b1842bd9f1e.jpg"
]
}
}{
"taskType": "videoInference",
"taskUUID": "7d0bd235-600c-4d6b-92e9-4dad8671de30",
"videoUUID": "0063a249-61c3-4505-a621-232fe210c3f5",
"videoURL": "https://vm.runware.ai/video/os/a23d05/ws/5/vi/0063a249-61c3-4505-a621-232fe210c3f5.mp4",
"seed": 60086,
"cost": 1.2051
}Wind-Carved Cliffside Glass Conservatory
{
"taskType": "videoInference",
"taskUUID": "08a7bd31-232a-45a4-947f-cd12da384c13",
"model": "alibaba:wan@2.7",
"positivePrompt": "A vast glass conservatory built into a rugged seaside cliff at golden afternoon, filled with towering citrus trees, hanging orchids, brass irrigation pipes, and narrow stone walkways over koi pools. The video begins outside with waves striking dark rocks far below, then glides through broken archways into the warm greenhouse air where gardeners in slate-blue coats move carefully among giant leaves. Sunbeams refract through curved glass panels, casting shifting prismatic light across wet stone. A flock of white swifts circles through the upper rafters. Midway, the camera passes a child releasing a small mechanical glider that catches an updraft and sails through the central atrium. End on a wide view of the entire cliffside structure against the sea, with drifting mist, believable scale, natural motion, atmospheric depth, highly detailed textures, elegant cinematic realism.",
"negativePrompt": "low detail, blurry, distorted anatomy, extra limbs, jittery motion, flicker, text, watermark, logo, oversaturated colors, chaotic composition",
"width": 1920,
"height": 1080,
"duration": 8,
"seed": 55802,
"settings": {
"audio": true
}
}{
"taskType": "videoInference",
"taskUUID": "08a7bd31-232a-45a4-947f-cd12da384c13",
"videoUUID": "2eb904c2-9f91-43b4-a1f0-8442299b9bd7",
"videoURL": "https://vm.runware.ai/video/os/a21d05/ws/5/vi/2eb904c2-9f91-43b4-a1f0-8442299b9bd7.mp4",
"seed": 55802,
"cost": 1.2051
}Tidal Basilica of Kites
{
"taskType": "videoInference",
"taskUUID": "d05668ad-7e73-4e56-8810-e45e0f60e946",
"model": "alibaba:wan@2.7",
"positivePrompt": "Animate from the provided first frame into an epic coastal fantasy scene. The camera begins low near slick rocks and slowly rises forward toward the towering basilica while giant tethered kites strain and ripple overhead. Long fabric tails snap in powerful gusts, seabirds wheel across the frame, waves crash against the dark stone foundation and leave drifting mist, puddles shimmer with reflections, small robed figures climb the steps, and distant spray catches warm sunlight. Preserve the architecture and color design of the input image while adding natural motion, cinematic depth, and realistic environmental dynamics. Emphasize sweeping wind, moving clouds, foam, fluttering banners, and immersive ocean ambience.",
"negativePrompt": "text, watermark, logo, blurry subjects, low detail, warped architecture, extra limbs, duplicate people, broken kite strings, flicker, jitter, heavy distortion, oversaturation",
"width": 1280,
"height": 720,
"duration": 8,
"seed": 73685,
"settings": {
"audio": true
},
"inputs": {
"frameImages": [
{
"image": "https://assets.runware.ai/assets/inputs/c6ef74fa-764a-4d61-9227-bcf60b041f93.jpg",
"frame": "first"
}
]
}
}{
"taskType": "videoInference",
"taskUUID": "d05668ad-7e73-4e56-8810-e45e0f60e946",
"videoUUID": "a136180f-118e-4528-bf66-9c8d7e5f1a89",
"videoURL": "https://vm.runware.ai/video/os/a08d21/ws/5/vi/a136180f-118e-4528-bf66-9c8d7e5f1a89.mp4",
"seed": 73685,
"cost": 0.8034
}