curl --location 'https://dashscope-intl.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 premium smart glasses product ad with a minimalist, futuristic, and fashionably sophisticated style. Restrained lighting with black, silver-gray, and ice-blue as the primary palette, accented by soft white light and parametric UI graphics. Opening on a pure black background, smart glasses slowly emerge from darkness with refined highlights along the temple edges, the frame outlined by cool rim lighting. The camera captures ultra-close-up shots of the lens, nose pads, hinges, temples, and material details, showcasing the delicate texture of metal and high-performance composites. Subsequently the product rotates slowly in mid-air while minimalist motion graphics display core specs. Then the camera quickly converges, all components precisely reassembling into the complete product, cutting to a young model wearing them—sharp features, confident demeanor, in clean urban fashion, naturally turning, raising a hand, walking, and smiling in a minimal space with city light and shadow. The closing shot shows the product suspended on a solid background as the camera slowly pushes into the brand logo and core 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
}
}'{
"request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx",
"output": {
"task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx",
"task_status": "PENDING"
}
}- Python SDK
from http import HTTPStatus
from dashscope import VideoSynthesis
import dashscope
import os
# If you have not set environment variables, replace the following line with your API Key: api_key="sk-xxx"
# Get API Key: https://www.alibabacloud.com/help/model-studio/get-api-key
api_key = os.getenv("DASHSCOPE_API_KEY")
media = [{'type': 'file', 'url': 'https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260806/ebapmr/glass.pptx'}]
def sample_async_call():
# Submit video generation task asynchronously
rsp = VideoSynthesis.async_call(api_key=api_key,
model='wan3.0-video',
prompt='A high-end smart glasses product advertisement with a minimalist, futuristic, and fashionable style. The color palette features black, silver-gray, and ice-blue tones with subtle white light accents and parameter UI graphics. Opening in pure black background, a pair of smart glasses slowly emerges from darkness with refined highlights on the temple edges. The camera captures ultra-close details of lenses, nose pads, hinges, temples, and material textures, showcasing metal and high-performance composite materials. The product then rotates slowly in mid-air with minimalist motion graphics displaying core parameters. Then the camera pulls back as all parts precisely reassemble into the complete product, transitioning to a young model wearing demonstration in minimalist spaces and urban lighting environments.',
media=media,
resolution='480P',
ratio='adaptive',
duration=10,
prompt_extend=True)
print(rsp)
if rsp.status_code == HTTPStatus.OK:
print("task_id: %s" % rsp.output.task_id)
else:
print('Failed, status_code: %s, code: %s, message: %s' %
(rsp.status_code, rsp.code, rsp.message))
# Query task status
status = VideoSynthesis.fetch(task=rsp, api_key=api_key)
if status.status_code == HTTPStatus.OK:
print(status.output.task_status)
else:
print('Failed, status_code: %s, code: %s, message: %s' %
(status.status_code, status.code, status.message))
# Wait for task completion
rsp = VideoSynthesis.wait(task=rsp, api_key=api_key)
print(rsp)
if rsp.status_code == HTTPStatus.OK:
print(rsp.output.video_url)
else:
print('Failed, status_code: %s, code: %s, message: %s' %
(rsp.status_code, rsp.code, rsp.message))
if __name__ == '__main__':
sample_async_call()
Authorizations
QwenCloud API Key. See Get an API Key.
Header Parameters
Must be set to enable for asynchronous task submission. Missing this header causes: "current user api does not support synchronous calls".
Body
application/jsonModel name. Valid values:
wan3.0-video-prime: High-speed version with capabilities aligned to the standard version, with significantly improved end-to-end speed.wan3.0-video: Standard version.
Input information. Either prompt or media is required.
Show child attributes
Show child attributes
Text prompt describing the desired video content. Either this or media is required. Supports Chinese and English, up to 20,000 characters (auto-truncated beyond). In all-in-one reference mode, use "Image1", "Video1", "Audio1" etc. in the prompt to refer to media items by their array order.
Media array supporting images, videos, audio, files, and web links as input. Either this or prompt is required. In reference mode, array order defines the numbering in prompts (images and videos are counted separately). reference_xx/file/link types and first_frame/last_frame types are mutually exclusive.
Show child attributes
Show child attributes
Media type. reference_xx/file/link types and first_frame/last_frame types are mutually exclusive within the same request.
Media limits by type:
reference_image/first_frame/last_frame(image): JPEG/JPG/PNG/BMP/WEBP; resolution [240, 8000] per side; aspect ratio ≤ 8:1; file size ≤ 20MB.reference_video(video): mp4/mov; duration [1, 15]s per clip, total ≤ 15s; frame rate ≥ 16 fps; resolution [240, 4096] per side; aspect ratio ≤ 8:1; file size ≤ 100MB per clip.reference_audio(audio): wav/mp3; duration [1, 15]s per clip, total ≤ 15s; file size ≤ 15MB.file: docx/doc/xlsx/xls/pptx/ppt/pdf/txt/key/pages/numbers/md; file size ≤ 100MB; page limit ≤ 50 pages (validated for pdf/docx/doc/pptx/ppt/key/pages).
Media URL or Base64-encoded data. Supports public URLs (HTTP/HTTPS) and Base64 encoding (data:{MIME_type};base64,{data}).
Video generation parameters.
Show child attributes
Show child attributes
Output video resolution tier.
Output video aspect ratio. adaptive automatically selects the best ratio based on input media and intent.
Output video duration in seconds. Without video input: integer in [2, 30]. With video input: input + output duration must not exceed 30s. Set to -1 for smart duration mode (model selects optimal length).
Whether the output video includes audio. true (default): includes sound. false: no audio track. Pricing is the same regardless of this setting.
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.
Whether to add a watermark.
Whether to enable intelligent prompt rewriting. When enabled, a large language model rewrites the input prompt to improve video generation quality. Recommended for shorter prompts; increases latency slightly.
Response
Unique request identifier for tracing and troubleshooting.