Skip to main content

Wan3.0 - Video Generation API Reference

Wan3.0 is an All-in-One reference-based video generation model that supports Text-to-Video , Image-to-Video (first frame/first-last frame), and Reference-based Video Generation . It can generate videos up to 30 seconds long at 30fps. Currently in preview .

For the usage guide, see Wan3.0 - Video Generation.

Prerequisites

To ensure a successful API call, make sure that the model, Endpoint URL and API Key all belong to the same region. Cross-region calls will fail.
The sample code in this topic applies to the Singapore region.

HTTP call

Since video generation tasks take a relatively long time (typically 1-5 minutes), the API uses asynchronous calls. The entire process consists of two core steps: "Create a task -> Poll for results", as described below:

Step 1: Create a task and obtain the task ID

  • Singapore
  • Beijing
  • US (Virginia)
  • Japan (Tokyo)
  • Germany (Frankfurt)
  • China (Hong Kong)
POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis
Replace {WorkspaceId} with your actual workspace ID.
  • After the task is created successfully, use the task_id returned by the API to query the result. The task_id is valid for 24 hours. Do not create duplicate tasks; polling is sufficient to obtain the result.
  • For beginner guidance, see Postman.

Request parameters

Request headers (Headers)
Content-Type string (Required)The content type of the request. Must be application/json.Authorization string (Required)Authenticates the request with a Model Studio API key. Example: Bearer sk-xxxx.X-DashScope-Async string (Required)Asynchronous processing configuration parameter. HTTP requests only support asynchronous mode, and it must be set to enable.
If this request header is missing, the error "current user api does not support synchronous calls" is returned.
Request body (Request Body)
model string (Required)Model name. Valid values:
  • wan3.0-video-prime: Its capabilities are aligned with the standard version. When resources are constrained, some tasks may run at the standard inference rate. The system automatically identifies these tasks and charges them at the standard-rate model price.
  • wan3.0-video: Standard version.
input object (Required)Basic input information. Either prompt or media must be provided.

Properties

prompt string (Conditionally required)Text prompt used to describe the desired video content. Either this or media must be provided.Supports both Chinese and English. Each Chinese character or letter counts as one character, with a maximum of 20,000 characters. Content exceeding this limit will be automatically truncated.In reference mode, you can use "Image 1", "Video 1", etc. in the prompt to refer to media assets in the corresponding order within the media array.media array (Conditionally required)Media asset array that supports images, videos, audio, files, and web pages as input. Either this or prompt must be provided.
  • Each element in the array is a media object containing the type and url fields.
  • In reference-based video generation mode, the array order defines the reference order of assets in the prompt. Images and videos are counted separately, meaning Image 1 and Video 1 can coexist.
    • The 1st reference_video in the array corresponds to Video 1, the 2nd corresponds to Video 2, and so on.
    • The 1st reference_image in the array corresponds to Image 1, the 2nd corresponds to Image 2, and so on.
    • The 1st reference_audio in the array corresponds to Audio 1, the 2nd corresponds to Audio 2, and so on.

Properties

type string (Required)Media asset type. Valid values:
  • first_frame: First frame image. Maximum 1 image, strictly used as the first frame of the video.
  • last_frame: Last frame image. Maximum 1 image, strictly used as the last frame of the video.
  • reference_image: Reference image. Maximum 10 images.
  • reference_video: Reference video. Maximum 5 clips, with a total duration of no more than 15 seconds.
  • reference_audio: Reference audio. Maximum 5 clips, with a total duration of no more than 15 seconds.
  • file: File. Maximum 1 file, cannot be used together with link.
  • link: Web link. Maximum 1 link, cannot be used together with file.
For combination rules and restrictions for different type values, see Material combinations.
url string (Required)Media asset URL or Base64 encoded data.

Input image (type=first_frame / last_frame / reference_image)

Image URL or Base64 encoded data.Image limits:
  • Format: JPEG, JPG, PNG (transparent channel not supported), BMP, WEBP.
  • Resolution: [240, 8000] pixels per side.
  • Aspect ratio: no more than 8:1.
  • File size: no more than 20MB.
Supported input formats:
  1. Public URL:
  2. Base64 encoded image string:
    • Data format: data:{MIME_type};base64,{base64_data}.
    • Example: data:image/png;base64,GDU7MtCZzEbTbmRZ...... (the encoded string is too long, only a fragment is shown)
    • For details, see Input Image.

Input video (type=reference_video)

Reference video URL.Video limits:
  • Format: mp4, mov.
  • Duration: [1, 15] seconds per clip, with a total duration of no more than 15 seconds.
  • Frame rate: ≥16 fps.
  • Resolution: [240, 4096] pixels per side.
  • Aspect ratio: no more than 8:1.
  • File size per clip: no more than 100MB.
Supported input formats:
  1. Public URL:

Input audio (type=reference_audio)

Reference audio URL.Audio limits:
  • Format: wav, mp3.
  • Duration: [1, 15] seconds per clip, with a total duration of no more than 15 seconds.
  • File size: no more than 15MB.
Supported input formats:
  1. Public URL:

Input file (type=file)

File URL.File limits:
  • Format: docx, doc, xlsx, xls, pptx, ppt, pdf, txt, key, pages, numbers, md.
  • File size: no more than 100MB.
  • Page limit: no more than 50 pages (validated for pdf, docx, doc, pptx, ppt, key, pages formats).
Supported input formats:
  1. Public URL:

Input web link (type=link)

parameters object (Optional)Video processing parameters.

Properties

resolution string (Optional)Resolution tier of the generated video. Default value: 1080P. Valid values:
  • 1080P
  • 720P
  • 480P
ratio string (Optional)Aspect ratio of the generated video. Valid values:
  • adaptive (Default value): Adaptive aspect ratio that automatically recommends a suitable aspect ratio based on the input media proportions and intent.
  • 21:9
  • 16:9
  • 4:3
  • 1:1
  • 3:4
  • 9:16
duration integer (Optional)Duration of the generated video, in seconds. Default value: 5.
  • Without video input: an integer in the range [2, 30].
  • With video input: the total input video duration + output video duration must not exceed 30 seconds.
  • When set to -1: Smart duration mode, where the model automatically recommends a suitable duration based on the input prompt, content, and rich media.
audio boolean (Optional)Whether the output video contains audio.
  • true: Default value, the output video contains audio.
  • false: The output video does not contain an audio track.
Enabling or disabling audio does not affect pricing.seed integer (Optional)Random seed. Used to reproduce generation results. Value range: -1 or [0, 2147483647]. When set to -1 or not specified, the system automatically generates a random seed. Even with the same seed value, generation results may not be perfectly identical.prompt_extend boolean (Optional)Whether to enable intelligent prompt rewriting. When enabled, a large language model rewrites the input prompt. This significantly improves generation quality for shorter prompts, but increases latency.
  • true: Default value, intelligent rewriting is enabled.
  • false: Intelligent rewriting is disabled.
When a document (file) or webpage (link) is provided as input, prompt_extend must be set to true.
watermark boolean (Optional)Whether to add a watermark.
  • false: Default value, no watermark is added.
  • true: A watermark is added.
  • File Reference to Video
  • Reference-based Video Generation
  • Text-to-Video
  • First Frame to Video
  • First-Last Frame to Video
  • Video Editing
  • Video Extension
Pass in a file through the file type, and the model automatically understands the file content to generate a video.
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": "一支高端智能眼镜产品广告,整体风格极简、未来感、时尚高级,光影克制,画面以黑色、银灰色、冰蓝色为主色调,局部点缀柔和白光与参数UI图形。开场在纯黑背景中,一副智能眼镜从黑暗中缓缓浮现,镜腿边缘掠过精致高光,镜框轮廓在冷冽边缘光下被勾勒出来,镜头超近距离掠过镜片、鼻托、转轴、镜腿与材质细节,展现金属与高性能复合材料的细腻质感,表面处理高级克制,线条轻薄流畅。随后产品在空中缓慢旋转,画面以极简动态图形同步展示核心参数信息。随后镜头快速收拢,所有零件精准回归组装成完整产品,切换到年轻模特佩戴展示,模特五官立体、气质自信,穿着简洁高级的都市时尚服装,在极简空间和城市光影环境中自然转头、抬手、行走、微笑,镜头从正面、侧面、斜后方展示眼镜佩戴状态,突出轻薄贴合、时尚轮廓与日常百搭属性。结尾在纯色背景中,产品悬浮定格,镜头缓慢推进到品牌logo和核心slogan,整体音乐极简电子氛围配合精准鼓点,节奏干净有力,画面质感高级、克制、纯粹,具有强烈品牌记忆点和国际化科技审美。",
        "media": [
            {
                "type": "file",
                "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260806/ebapmr/glass.pptx"
            }
        ]
    },
    "parameters": {
        "resolution": "480P",
        "ratio": "adaptive",
        "duration": 10,
        "prompt_extend": true
    }
}'

Response parameters

output objectTask output information.

Properties

task_id stringThe task ID. Valid for queries for 24 hours.task_status stringThe status of the task.

Enumeration values

  • PENDING
  • RUNNING
  • SUCCEEDED
  • FAILED
  • CANCELED
  • UNKNOWN: The task does not exist or its status is unknown.
request_idstringUnique request identifier for tracing and troubleshooting.codestringError code. Returned only for failed requests. See Error codes.messagestringDetailed error message. Returned only for failed requests. See Error codes.
  • Successful response
  • Error response
Save the task_id for querying the task status and results.
{
    "output": {
        "task_status": "PENDING",
        "task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx"
    },
    "request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx"
}

Step 2: Query results by task ID

  • Singapore
  • Beijing
  • US (Virginia)
  • Japan (Tokyo)
  • Germany (Frankfurt)
  • China (Hong Kong)
GET https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/tasks/{task_id}
  • Polling recommendation: Video generation takes several minutes. We recommend using a polling mechanism with a reasonable query interval (for example, 15 seconds) to obtain the result.
  • Task status transitions: PENDING (Queuing) → RUNNING (Processing) → SUCCEEDED (Success) / FAILED (Failed).
  • Result link: After the task succeeds, a video link is returned and is valid for 24 hours. We recommend downloading the video immediately after obtaining the link and transferring it to permanent storage (such as Alibaba Cloud OSS).
  • task_id validity: 24 hours. After the timeout, the result can no longer be queried, and the API will return the task status UNKNOWN.

Request parameters

Request headers (Headers)
Authorization string (Required)Authenticates the request with a Model Studio API key. Example: Bearer sk-xxxx.
URL path parameters (Path parameters)
task_id string (Required)The ID of the task.
  • Query task results
Replace {task_id} with the task_id value returned by the previous API call. The task_id is valid for queries for 24 hours, Replace {WorkspaceId} with your actual workspace ID.
curl -X GET https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/tasks/{task_id} \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"

Response parameters

output objectTask output information.

Properties

task_id string (Required)The ID of the task.task_status stringThe status of the task.

Enumeration values

  • PENDING
  • RUNNING
  • SUCCEEDED
  • FAILED
  • CANCELED
  • UNKNOWN: The task does not exist or its status is unknown.
submit_time stringTask submission time. The time zone is UTC+8, in the format YYYY-MM-DD HH:mm:ss.SSS.scheduled_time stringTask execution time. The time zone is UTC+8, in the format YYYY-MM-DD HH:mm:ss.SSS.end_time stringTask completion time. The time zone is UTC+8, in the format YYYY-MM-DD HH:mm:ss.SSS.orig_prompt stringThe original input prompt.video_url stringThe URL of the generated video. Returned when the task succeeds. The video format is MP4 (H.264 encoding).codestringError code. Returned only for failed requests. See Error codes.messagestringDetailed error message. Returned only for failed requests. See Error codes.
usage objectOutput statistics. Only successful results are counted.

Properties

served_model stringThe model that actually provides the service, used for metering and billing. Billing is calculated based on the model returned by this field. This field is returned and always has a value when the requested model is a Prime model: wan3.0-video-prime when no downgrade occurs, or wan3.0-video when a downgrade occurs.video_count integerThe number of generated videos. Fixed at 1.duration floatThe total video duration in seconds. When no reference video is input, it equals the output video duration; when a reference video is input, it equals the sum of the input video duration and the output video duration.SR integerThe resolution of the generated video. Example value: 720.output_video_duration floatThe duration of the output video, in seconds.input_video_duration floatThe duration of the input video, in seconds. When no video is input, the value is 0.0.fps integerThe frame rate of the generated video. The default value is 30.ratio stringThe aspect ratio of the generated video. Example value: 16:9.
request_idstringUnique request identifier for tracing and troubleshooting.
  • Task executed successfully
  • Task failed
  • Task query expired
The video URL is retained for only 24 hours and will be automatically cleared after the timeout. Save the generated video in a timely manner.
{
    "request_id": "78c9b768-0285-996c-b682-xxxxxx",
    "output": {
        "task_id": "17ed7e50-00cf-4509-aea1-xxxxxx",
        "task_status": "SUCCEEDED",
        "submit_time": "2026-08-06 10:01:35.452",
        "scheduled_time": "2026-08-06 10:01:35.507",
        "end_time": "2026-08-06 10:13:33.838",
        "orig_prompt": "A golden retriever running on a sunny beach, waves crashing in the background, cinematic lighting",
        "video_url": "https://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/xxx/video.mp4"
    },
    "usage": {
        "served_model": "wan3.0-video",
        "video_count": 1,
        "duration": 5.0,
        "SR": 480,
        "output_video_duration": 5.0,
        "input_video_duration": 0.0,
        "fps": 30,
        "ratio": "16:9"
    }
}

Material combinations

Only the following specific material combinations are supported. Passing in other combinations will result in an error.
Text-to-Video: Only pass in prompt. media is not supported.
// 文生视频
{
  "input": {
    "prompt": "..."
  }
}
Image-to-Video, Reference-based Video Generation, Video Editing, Video Extension, and other modes require passing in materials through the media array, with each element specifying type and url. type combination rules:
  • first_frame/last_frame and reference_image/reference_video/reference_audio/file/link types are mutually exclusive and cannot be used together in the same request.
  • file and link are mutually exclusive (choose one), but both can be combined with reference_image/reference_video/reference_audio.
  • reference_image/reference_video/reference_audio can be freely combined with each other.
// 仅首帧
{
  "media": [
    { "type": "first_frame", "url": "..." }
  ]
}

FAQ

Why can't I pass in audio or other media assets in first/first-last frame mode?

Wan3.0's first frame/first-last frame mode only supports first_frame and last_frame, and cannot accept other types such as audio at the same time (see Material combinations). Difference from Wan2.7 Image-to-Video series: Wan2.7's first frame/first-last frame mode supports passing in driving_audio for audio-driven generation; Wan3.0's first frame/first-last frame mode does not. If you need audio-driven generation, use the all-modal reference mode (reference_image + reference_audio combination) instead. For specific usage, see Wan3.0 - Video Generation Guide.