Wan Videos Generation API
POSThttps://api.acedata.cloud/wan/videos

This API can generate videos by inputting prompt words and first and last frame images.

Request Headers

acceptstring
Specify the response format returned by the server.
Please select
authorizationstring
Bearer token

Request Body

actionstringRequired parameter
Operation types. `text2video` indicates text-to-video, and `image2video` indicates image-to-video.
modelstringRequired parameter
Models for generating videos include optional values such as `wan2.6-t2v` (text-to-video), `wan2.6-i2v` (image-to-video), `wan2.6-i2v-flash` (fast version of image-to-video), and `wan2.6-r2v` (reference video generation).
promptstringRequired parameter
Prompts for generating videos.
durationnumber
Specify the duration of the video to be generated (in seconds), with optional values of `5`, `10`, or `15`.
Please select
shot_typestring
Specify the type of shots for the video, that is, whether the video consists of a single continuous shot (`single`) or multiple switching shots (`multi`).
Please select
resolutionstring
Specify the resolution level for generating the video, used to adjust the video clarity (total pixel count). The model will automatically scale to a similar total pixel count based on the selected resolution level, and the aspect ratio of the generated video will strive to remain consistent with the aspect ratio of the input image `image_url`.
Please select
sizestring
Video size specifications.
negative_promptstring
Reverse prompt words, used to describe content that is not desired to appear in the video footage, can be used to limit the video visuals. Supports both Chinese and English, with a length not exceeding 500 characters; any excess will be automatically truncated.
audio_urlstring
The URL of the audio file, the model will generate the corresponding video based on that audio.
reference_video_urlsstring
An array of URLs for reference video files, used to extract the character images (and vocal tones, if any) from the reference videos to generate videos that match the reference features.
image_urlstring
The URL of the starting frame image, which will serve as the first frame of the generated video.
callback_urlstring
Asynchronous notification Webhook callback URL.
asyncboolean
Whether to process in asynchronous mode. When set to `true`, the interface immediately returns `task_id`, without the need to provide `callback_url`, and then the result can be obtained by polling the corresponding task query interface; if `callback_url` is also provided, the result will be pushed to that callback address.
Please select
audioboolean
Specify whether the generated video contains sound.
Please select
prompt_extendboolean
Whether to enable intelligent rewriting of prompts. Once enabled, a large model will be used to intelligently expand the input prompts, which can significantly improve the generation effect of shorter prompts, but will increase processing time.
Please select

Response

Tongyi Wansiang Video Generation
Allow Use General Balance

When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.

Shell

Python

JavaScript

Java

Go

PHP

Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.