Wan2.6 Text to Video
- WAN2.6 (wan2.6-text-to-video) model supports text-to-video generation
- Asynchronous processing mode, use the returned task ID to query status
- Generated video links are valid for 24 hours, please save them promptly
Authorizations
All APIs require Bearer Token authentication
Get API Key:
Visit API Key Management Page to get your API Key
Add to request header:
Authorization: Bearer YOUR_API_KEYBody
Model name
wan2.6-text-to-video "wan2.6-text-to-video"
Prompt describing the video you want to generate, limited to 1500 characters
1500"A cat playing piano"
Video aspect ratio, defaults to 16:9
Options:
720p: Supports16:9(landscape),9:16(portrait),1:1(square),4:3,3:41080p: Supports16:9(landscape),9:16(portrait),1:1(square),4:3,3:4
"16:9"
Video quality, defaults to 720p
Options:
720p: Standard definition, standard price, this is the default1080p: High definition, higher price
Note: Different quality levels support different aspect ratios, see aspect_ratio parameter
"720p"
Specifies the duration of the generated video (in seconds)
Note:
- Supports any integer value between
2~15seconds - Each request will be pre-charged based on the
durationvalue, actual charge is based on the generated video duration
2 <= x <= 155
Whether to enable intelligent prompt rewriting. When enabled, a large model will optimize the prompt, which significantly improves results for simple or insufficiently descriptive prompts. Default is true
true
Model parameter configuration
Audio file URL. The model will use this audio to generate the video.
Format Requirements:
- Supported format:
mp3 - Duration:
3~30seconds - File size: Up to
15MB
Overflow Handling:
- If the audio length exceeds the
durationvalue (5 or 10 seconds), the first 5 or 10 seconds will be automatically extracted, and the rest will be discarded - If the audio length is shorter than the video duration, the portion exceeding the audio length will be silent. For example, if the audio is 3 seconds and the video duration is 5 seconds, the output video will have sound for the first 3 seconds and be silent for the last 2 seconds
"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp3"
HTTPS callback URL for task completion
Callback Timing:
- Triggered when task is completed, failed, or cancelled
- Sent after billing confirmation
Security Restrictions:
- Only HTTPS protocol is supported
- Callbacks to internal IP addresses are prohibited (127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x, etc.)
- URL length must not exceed
2048characters
Callback Mechanism:
- Timeout:
10seconds - Up to
3retries after failure (retries at1/2/4seconds after failure) - Callback response format is consistent with the task query API response
- 2xx status codes are considered successful, other status codes trigger retries
"https://your-domain.com/webhooks/video-task-completed"
Response
Video task created successfully
Task creation timestamp
1757169743
Task ID
"task-unified-1757169743-7cvnl5zw"
Actual model name used
"wan2.6-text-to-video"
Task type
video.generation.task Task progress percentage (0-100)
0 <= x <= 1000
Task status
pending, processing, completed, failed "pending"
Video task details
Task output type
text, image, audio, video "video"
Usage and billing information