Wan 3.0 Video Generation
Submit an asynchronous Alibaba Cloud Wan 3.0 video generation task. Supports text-to-video, image-to-video (first frame / first-last frame), and reference-to-video.
This capability uses the top-level media array as multimodal input. Different combinations of media.type enable different capabilities:
- Text-to-video: Only pass
prompt, nomedia. - First frame to video: Pass
first_frametype media. - First-last frame to video: Pass both
first_frameandlast_frametype media. - Reference to video: Pass
reference_image,reference_video, orreference_audiotype media.
Note: reference_xx / file / link types and first_frame / last_frame types are mutually exclusive and cannot be mixed in the same request.
After submission, query the task status via GET /v1/videos/{task_id}.
Authorizations
Pass Authorization: Bearer <token> in the request header.
Body
Model name. Options:
wan3.0-video: Standard version.wan3.0-video-prime: Speed version with identical capabilities but significantly faster end-to-end speed.
wan3.0-video, wan3.0-video-prime Text prompt describing the desired video content. Required if media is not provided.
Supports Chinese and English. Each character counts as one, up to 20000 characters (excess will be truncated).
In all-in-one reference mode, use image 1, video 1, etc. in the prompt to reference media items by their order in the media array.
Media asset array supporting images, videos, audio, files, and web links as input. Required if prompt is not provided.
-
Each element is a media object with
typeandurlfields. -
In reference-to-video mode, the order in the array defines the reference order in the prompt. Images and videos are counted separately, so image 1 and video 1 can coexist.
-
The 1st
reference_imagecorresponds to image 1, the 2nd to image 2, etc. -
The 1st
reference_videocorresponds to video 1, the 2nd to video 2, etc. -
The 1st
reference_audiocorresponds to audio 1, the 2nd to audio 2, etc.
Important: size directly affects cost. Please confirm model pricing before calling.
Video resolution tier. Default is 1080P.
480P, 720P, 1080P Video aspect ratio. Default is adaptive (automatically selects an appropriate ratio based on input media and intent).
Options:
adaptive(default): Adaptive aspect ratio.16:94:31:13:49:16
adaptive, 16:9, 4:3, 1:1, 3:4, 9:16 Important: seconds directly affects cost. Please confirm model pricing before calling.
Video duration in seconds. Default is 5.
- Without video input: Integer in range [2, 30].
- With video input: Input video total duration + output video duration must not exceed 30 seconds.
- Pass
-1: Smart duration mode, where the model automatically recommends an appropriate duration based on the prompt, content, and rich media.
-1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 Whether the output video includes audio.
true(default): Output video includes audio.false: Output video has no audio track.
Pricing is the same with or without audio.
Whether to enable prompt intelligent rewriting. When enabled, a large model rewrites the input prompt. Significantly improves results for short prompts, but increases processing time.
true(default): Enable intelligent rewriting.false: Disable intelligent rewriting.
Whether to add a watermark. The watermark is located in the bottom-right corner with the text "AI Generated".
false(default): No watermark.true: Add watermark.
Random seed for reproducibility. Range: [0, 2147483647].
When not specified, a random seed is auto-generated. For better reproducibility, fix the seed value. Note that due to the probabilistic nature of generation, identical results are not guaranteed even with the same seed.
0 <= x <= 2147483647Response
Submission successful, returns a unified video task object.
Unique task identifier.
Task ID (alias for id).
"video"
Model name used.
Task status.
pending, queued, running, succeeded, failed, cancelled Task progress percentage.
Creation time as Unix timestamp in seconds.