All Products
Search
Document Center

Alibaba Cloud Model Studio:Wan3.0 Video Generation

Last Updated:Aug 26, 2026

The wan3.0 series is an All-in-One video generation model with comprehensive upgrades in audio-video generation, multi-modal reference, and video editing capabilities. It supports up to 30 seconds per generation, 30fps output frame rate, natively outputs dialogue, BGM, and sound effects, supports up to 20 multi-modal reference materials (images, videos, audio, documents, web pages) per request, and supports first frame/first-last frame control and video editing/extension.

Scope

NoteThe sample code is applicable to the Singapore region.

Model capabilities

wan3.0-video / wan3.0-video-prime is an All-in-One model that covers all the following task types without switching model names. The model automatically routes based on the type field in input.media and the prompt intent.

Task type

Trigger method

Usage notes

Text-to-video

Only pass prompt, do not pass media

Supports free setting of resolution, aspect ratio, and duration

Image-to-video

First frame to video

type set to first_frame

ratio recommended as adaptive, model auto-matches first frame aspect ratio

First and last frame to video

type set to first_frame and last_frame

ratio recommended as adaptive, model auto-matches first frame aspect ratio

Multi-modal reference

Image reference

type set to reference_image

Up to 10 images, each no more than 20MB

Video reference

type set to reference_video

Up to 5 clips, total duration no more than 15 seconds, each no more than 100MB

Audio reference

type set to reference_audio

Up to 5 clips, total duration no more than 15 seconds, each no more than 15MB

Combined reference

type set to reference_image/reference_video/reference_audio combination

Supports any combination of image/video/audio references (image+video, image+audio, video+audio, image+video+audio)

File/web page reference

type set to file or link (choose one, max 1 each)

Parse document/web page content to generate video. Only publicly accessible pages are supported.

Video editing

type set to reference_video + prompt with editing intent (e.g., "convert to", "remove", "replace", "change to")

Add/remove/modify elements, style conversion, lighting editing, dialogue editing. ratio recommended as adaptive, duration recommended as -1 (auto-preserves original aspect ratio and duration)

Video extension

type set to reference_video + prompt with extension intent (e.g., "extend", "continue", "extend forward/backward")

Extend forward/backward/both directions. ratio recommended as adaptive (auto-preserves original aspect ratio)

Core capabilities

Before making calls, first Obtain an API key, then Configure API key as an environment variable. To call via SDK, please install the DashScope SDK.

Text-to-video

Generate video using only a prompt, without any media input. Natively supports up to 30-second multi-shot narratives with auto-generated synchronized dialogue, BGM, and sound effects.

Input promptOutput video (multi-shot, with audio)

A vision of future technology and nature coexisting in harmony. Shot 1 [0-2s] Panoramic view of a futuristic city's aerial garden, floating plants swaying in the breeze. Shot 2 [2-4s] A robot gardener carefully trimming plants with precise and elegant movements. Shot 3 [4-7s] Sunlight streams through the transparent dome, illuminating the entire garden, showcasing the perfect fusion of technology and nature. Shot 4 [7-10s] Camera pulls back to reveal the spectacular view of the entire futuristic city, with the aerial garden being just one part of it.

Python SDK

ImportantEnsure the DashScope Python SDK version is 1.25.16 or later before running the following code. If the version is too old, see Install the SDK for update instructions.

import os
from http import HTTPStatus
from dashscope import VideoSynthesis
import dashscope

# The following is the Singapore region URL. URLs differ by region. Get URL: https://www.alibabacloud.com/help/en/model-studio/wan3-video-generation-api-reference
dashscope.base_http_api_url = 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1'
# API Keys differ by region. Get API Key: https://www.alibabacloud.com/help/en/model-studio/get-api-key
api_key = os.getenv("DASHSCOPE_API_KEY", "YOUR_API_KEY")

print('please wait...')
rsp = VideoSynthesis.call(
    api_key=api_key,
    model='wan3.0-video',
    prompt='A vision of future technology and nature coexisting in harmony. Shot 1 [0-2s] Panoramic view of a futuristic city aerial garden, floating plants swaying in the breeze. Shot 2 [2-4s] A robot gardener carefully trimming plants with precise and elegant movements. Shot 3 [4-7s] Sunlight streams through the transparent dome, illuminating the entire garden, showcasing the perfect fusion of technology and nature. Shot 4 [7-10s] Camera pulls back to reveal the spectacular view of the entire futuristic city, with the aerial garden being just one part of it.',
    resolution="480P",
    ratio="adaptive",
    duration=20,
    prompt_extend=True)
print(rsp)
if rsp.status_code == HTTPStatus.OK:
    print("video_url:", rsp.output.video_url)
else:
    print('Failed, status_code: %s, code: %s, message: %s' % (rsp.status_code, rsp.code, rsp.message))

curl

Step 1: Create task and get task ID
curl --location 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
    "model": "wan3.0-video",
    "input": {
        "prompt": "A vision of future technology and nature coexisting in harmony. Shot 1 [0-2s] Panoramic view of a futuristic city aerial garden, floating plants swaying in the breeze. Shot 2 [2-4s] A robot gardener carefully trimming plants with precise and elegant movements. Shot 3 [4-7s] Sunlight streams through the transparent dome, illuminating the entire garden, showcasing the perfect fusion of technology and nature. Shot 4 [7-10s] Camera pulls back to reveal the spectacular view of the entire futuristic city, with the aerial garden being just one part of it."
    },
    "parameters": {
        "resolution": "480P",
        "ratio": "adaptive",
        "duration": 20,
        "prompt_extend": true
    }
}'
Step 2: Get result by task ID
curl -X GET 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/tasks/{task_id}' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY"

First frame to video

Strictly specify the first frame image of the video using first_frame. The model automatically generates audio for the video.

Input promptInput first frame imageOutput video

An urban fantasy art scene. A dynamic graffiti art character comes alive from a concrete wall, rapping and striking classic hip-hop poses.

rap

Python SDK

ImportantEnsure the DashScope Python SDK version is 1.25.16 or later before running the following code. If the version is too old, see Install the SDK for update instructions.

import os
from http import HTTPStatus
from dashscope import VideoSynthesis
import dashscope

dashscope.base_http_api_url = 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1'
api_key = os.getenv("DASHSCOPE_API_KEY", "YOUR_API_KEY")

print('please wait...')
rsp = VideoSynthesis.call(
    api_key=api_key,
    model='wan3.0-video',
    prompt='An urban fantasy art scene. A dynamic graffiti art character comes alive from a concrete wall, rapping and striking classic hip-hop poses.',
    media=[{"type": "first_frame", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png"}],
    resolution="720P",
    ratio="adaptive",
    duration=5)
print(rsp)
if rsp.status_code == HTTPStatus.OK:
    print("video_url:", rsp.output.video_url)
else:
    print('Failed, status_code: %s, code: %s, message: %s' % (rsp.status_code, rsp.code, rsp.message))

curl

Step 1: Create task and get task ID
curl --location 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
    "model": "wan3.0-video",
    "input": {
        "prompt": "An urban fantasy art scene. A dynamic graffiti art character comes alive from a concrete wall, rapping and striking classic hip-hop poses.",
        "media": [
            {
                "type": "first_frame",
                "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png"
            }
        ]
    },
    "parameters": {
        "resolution": "720P",
        "ratio": "adaptive",
        "duration": 5
    }
}'
Step 2: Get result by task ID
curl -X GET 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/tasks/{task_id}' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY"

First and last frame to video

Provide both first_frame and last_frame to strictly specify the first and last frame images of the video.

Input promptInput first frame imageInput last frame imageOutput video

At dawn as the sun just rises, in a pumpkin field, there is a small pumpkin with dewdrops on it. Suddenly the pumpkin cracks with a sound, golden light seeps through the crack, the pumpkin splits open with golden light, white mist appears, and a small rabbit emerges from the center of the split pumpkin.

first-framelast-frame

Python SDK

ImportantEnsure the DashScope Python SDK version is 1.25.16 or later before running the following code. If the version is too old, see Install the SDK for update instructions.

import os
from http import HTTPStatus
from dashscope import VideoSynthesis
import dashscope

dashscope.base_http_api_url = 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1'
api_key = os.getenv("DASHSCOPE_API_KEY", "YOUR_API_KEY")

print('please wait...')
rsp = VideoSynthesis.call(
    api_key=api_key,
    model='wan3.0-video',
    prompt='At dawn as the sun just rises, in a pumpkin field, there is a small pumpkin with dewdrops on it. Suddenly the pumpkin cracks with a sound, golden light seeps through the crack, the pumpkin splits open with golden light, white mist appears, and a small rabbit emerges from the center of the split pumpkin.',
    media=[
        {"type": "first_frame", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260414/welyei/wan2.7-i2v-first-frame.webp"},
        {"type": "last_frame", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260414/zongha/wan2.7-i2v-last-frame.webp"}
    ],
    resolution="720P",
    ratio="adaptive",
    duration=5)
print(rsp)
if rsp.status_code == HTTPStatus.OK:
    print("video_url:", rsp.output.video_url)
else:
    print('Failed, status_code: %s, code: %s, message: %s' % (rsp.status_code, rsp.code, rsp.message))

curl

Step 1: Create task and get task ID
curl --location 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
    "model": "wan3.0-video",
    "input": {
        "prompt": "At dawn as the sun just rises, in a pumpkin field, there is a small pumpkin with dewdrops on it. Suddenly the pumpkin cracks with a sound, golden light seeps through the crack, the pumpkin splits open with golden light, white mist appears, and a small rabbit emerges from the center of the split pumpkin.",
        "media": [
            {
                "type": "first_frame",
                "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260414/welyei/wan2.7-i2v-first-frame.webp"
            },
            {
                "type": "last_frame",
                "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260414/zongha/wan2.7-i2v-last-frame.webp"
            }
        ]
    },
    "parameters": {
        "resolution": "720P",
        "ratio": "adaptive",
        "duration": 5
    }
}'
Step 2: Get result by task ID
curl -X GET 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/tasks/{task_id}' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Reference video generation

Provide reference images, videos, audio, files, or web links through input.media, and the model automatically understands the intent to generate video. In the prompt, use "Image 1", "Video 1", "Audio 1", etc. to refer to the corresponding materials in the media array.

NoteMaterial designation rules: Images, videos, and audio are counted separately. The first reference_image in the input.media array corresponds to "Image 1" in the prompt, the second to "Image 2"; the first reference_video corresponds to "Video 1"; the first reference_audio corresponds to "Audio 1", and so on. The three types do not conflict and can coexist.

Input prompt: Video 1 holds Image 3, sitting on the chair in Image 4, playing a soothing country folk song, and says: "The sunshine is so nice today." Image 1 holds Image 2 in hand, walks past Video 1, places Image 2 on the table next to Video 1, and says: "That sounds great, can you sing it again?"

Input image (Image 1)imageInput video (Video 1)Input images (Image 2, Image 3)imagewan-r2v-object4Input image (Image 4)wan-r2v-backgroud5Output video

Python SDK

ImportantEnsure the DashScope Python SDK version is 1.25.16 or later before running the following code. If the version is too old, see Install the SDK for update instructions.

import os
from http import HTTPStatus
from dashscope import VideoSynthesis
import dashscope

dashscope.base_http_api_url = 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1'
api_key = os.getenv("DASHSCOPE_API_KEY", "YOUR_API_KEY")

print('please wait...')
rsp = VideoSynthesis.call(
    api_key=api_key,
    model='wan3.0-video',
    prompt='Video 1 holds Image 3, sitting on the chair in Image 4, playing a soothing country folk song, and says: "The sunshine is so nice today." Image 1 holds Image 2 in hand, walks past Video 1, places Image 2 on the table next to Video 1, and says: "That sounds great, can you sing it again?"',
    media=[
        {"type": "reference_image", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/sjuytr/wan-r2v-object-girl.jpg"},
        {"type": "reference_video", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qigswt/wan-r2v-role2.mp4"},
        {"type": "reference_image", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/rtjeqf/wan-r2v-object3.png"},
        {"type": "reference_image", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qpzxps/wan-r2v-object4.png"},
        {"type": "reference_image", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/wfjikw/wan-r2v-backgroud5.png"}
    ],
    resolution="720P",
    ratio="adaptive",
    duration=5)
print(rsp)
if rsp.status_code == HTTPStatus.OK:
    print("video_url:", rsp.output.video_url)
else:
    print('Failed, status_code: %s, code: %s, message: %s' % (rsp.status_code, rsp.code, rsp.message))

curl

Step 1: Create task and get task ID
curl --location 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
    "model": "wan3.0-video",
    "input": {
        "prompt": "Video 1 holds Image 3, sitting on the chair in Image 4, playing a soothing country folk song, and says: \"The sunshine is so nice today.\" Image 1 holds Image 2 in hand, walks past Video 1, places Image 2 on the table next to Video 1, and says: \"That sounds great, can you sing it again?\"",
        "media": [
            {"type": "reference_image", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/sjuytr/wan-r2v-object-girl.jpg"},
            {"type": "reference_video", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qigswt/wan-r2v-role2.mp4"},
            {"type": "reference_image", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/rtjeqf/wan-r2v-object3.png"},
            {"type": "reference_image", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qpzxps/wan-r2v-object4.png"},
            {"type": "reference_image", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/wfjikw/wan-r2v-backgroud5.png"}
        ]
    },
    "parameters": {
        "resolution": "720P",
        "ratio": "adaptive",
        "duration": 5
    }
}'
Step 2: Get result by task ID
curl -X GET 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/tasks/{task_id}' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Video editing

Provide a reference video and use natural language instructions to precisely edit the video. Parts not specified for modification remain unchanged.

Python SDK

ImportantEnsure the DashScope Python SDK version is 1.25.16 or later before running the following code. If the version is too old, see Install the SDK for update instructions.

import os
from http import HTTPStatus
from dashscope import VideoSynthesis
import dashscope

dashscope.base_http_api_url = 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1'
api_key = os.getenv("DASHSCOPE_API_KEY", "YOUR_API_KEY")

print('please wait...')
rsp = VideoSynthesis.call(
    api_key=api_key,
    model='wan3.0-video',
    prompt='Convert the entire scene to clay style',
    media=[
        {"type": "reference_video", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260402/ldnfdf/wan2.7-videoedit-style-change.mp4"}
    ],
    resolution="720P",
    prompt_extend=True)
print(rsp)
if rsp.status_code == HTTPStatus.OK:
    print("video_url:", rsp.output.video_url)
else:
    print('Failed, status_code: %s, code: %s, message: %s' % (rsp.status_code, rsp.code, rsp.message))

curl

Step 1: Create task and get task ID
curl --location 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
    "model": "wan3.0-video",
    "input": {
        "prompt": "Convert the entire scene to clay style",
        "media": [
            {
                "type": "reference_video",
                "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260402/ldnfdf/wan2.7-videoedit-style-change.mp4"
            }
        ]
    },
    "parameters": {
        "resolution": "720P",
        "prompt_extend": true
    }
}'
Step 2: Get result by task ID
curl -X GET 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/tasks/{task_id}' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Video extension

Extend the duration of an existing video forward, backward, or both directions. Visual style and characters remain consistent, and the prompt describes the dynamic changes for the extended portion.

Python SDK

ImportantEnsure the DashScope Python SDK version is 1.25.16 or later before running the following code. If the version is too old, see Install the SDK for update instructions.

import os
from http import HTTPStatus
from dashscope import VideoSynthesis
import dashscope

dashscope.base_http_api_url = 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1'
api_key = os.getenv("DASHSCOPE_API_KEY", "YOUR_API_KEY")

print('please wait...')
rsp = VideoSynthesis.call(
    api_key=api_key,
    model='wan3.0-video',
    prompt='Extend Video 1 backward, the baker brings up the brushed bread, puts the brush aside, camera follows the baker to the oven behind for baking',
    media=[
        {"type": "reference_video", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260402/gmkrdi/wan2.7-i2v-video-continuation-2.mp4"}
    ],
    resolution="720P",
    ratio="adaptive")
print(rsp)
if rsp.status_code == HTTPStatus.OK:
    print("video_url:", rsp.output.video_url)
else:
    print('Failed, status_code: %s, code: %s, message: %s' % (rsp.status_code, rsp.code, rsp.message))

curl

Step 1: Create task and get task ID
curl --location 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
    "model": "wan3.0-video",
    "input": {
        "prompt": "Extend Video 1 backward, the baker brings up the brushed bread, puts the brush aside, camera follows the baker to the oven behind for baking",
        "media": [
            {
                "type": "reference_video",
                "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260402/gmkrdi/wan2.7-i2v-video-continuation-2.mp4"
            }
        ]
    },
    "parameters": {
        "resolution": "720P",
        "ratio": "adaptive"
    }
}'
Step 2: Get result by task ID
curl -X GET 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/tasks/{task_id}' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Input media

Each element in the input.media array contains type and url fields. Supported types and constraints are as follows:

type

Description

Constraints

first_frame

First frame image, strictly used as the first frame of the video

Maximum 1

last_frame

Last frame image, strictly used as the last frame of the video

Maximum 1

reference_image

Reference image

Maximum 10

reference_video

Reference video

Maximum 5, total duration no more than 15 seconds

reference_audio

Reference audio

Maximum 5, total duration no more than 15 seconds

file

File (docx, ppt, pdf, txt, etc.)

Maximum 1, cannot be used with link simultaneously

link

Web link (public web pages)

Maximum 1, cannot be used with file simultaneously

Importantreference_xx/file/link types and first_frame/last_frame types are mutually exclusive and cannot be used in the same request.

Output video

  • Format: MP4, 30fps frame rate.
  • The video URL is valid for 24 hours. Please save the video promptly.
  • Video dimensions are determined by resolution and ratio together. When using adaptive, the model automatically recommends an aspect ratio based on the input.

Billing and rate limits

API reference

Wan3.0 Video Generation API Reference

FAQ

Q: What are the differences between wan3.0-video and wan2.7 series models?

A: wan3.0-video is an All-in-One model with the following key differences:

  • Unified model name: wan3.0-video replaces wan2.7-t2v, wan2.7-i2v, and other separate models.
  • Up to 30 seconds: wan2.7 supports up to 10 seconds, while wan3.0 supports up to 30 seconds.
  • New reference video generation mode: supports reference images, videos, audio, files, and web links.
  • Adaptive aspect ratio: new ratio parameter with adaptive mode support.
  • Smart duration: when duration=-1, the model automatically recommends an appropriate duration.
  • Video editing and extension: wan3.0 natively supports video editing and extension capabilities.

Q: What do "Image 1" and "Video 1" mean in reference video generation?

A: Use "Image 1", "Video 1", "Audio 1" in the prompt to reference materials in the media array by their corresponding type. Images, videos, and audio are counted separately: the first reference_image in the array corresponds to "Image 1", the first reference_video corresponds to "Video 1", and so on.