Wan 2.1 T2V
Accelerated inference for Wan 2.1 14B Text-to-Video, a comprehensive and open suite of video foundation models that pushes the boundaries of video generation. By default, the API will generate a video with 5 seconds.
This is an asynchronous API; only the task_id will be returned. You should use the task_id to request the Task Result API to retrieve the video generation results.
Request Headers
Supports: application/json
Bearer authentication format, for example: Bearer {{API Key}}.
Request Body
Optional extra parameters for the request.
Name of the model checkpoint.
Supports: wan2.1-t2v
.
Width of the output video.
Supports: 480
, 720
, 832
, 1280
.
Height of the output video.
Supports:
832
forwidth
of480
480
forwidth
of832
720
forwidth
of1280
1280
forwidth
of720
LoRA models to be applied to the video generation.
Currently supports up to 3 LoRAs.
A seed is a number generates noise, which, makes generation deterministic. Using the same seed and set of parameters will produce identical content each time.
Range: -1 <= x <= 9999999999
.
Prompt text required to guide the generation.
Range: 1 <= x <= 2000
.
Negative prompts instruct the model on what elements to avoid generating.
Range: 0 <= x <= 2000
.
The number of inference steps.
Range: 1 <= x <= 40
. Default: 30
.
Guidance scale parameter controls how closely the generated content follows the prompt.
Range: 0 <= x <= 10
. Default: 5.0
.
The flow_shift parameter primarily affects the speed and magnitude of object movement in the video. Higher values produce more pronounced and faster movement, while lower values make the motion slower and more subtle.
Range: 1 <= x <= 10
. Default: 5.0
.
Response
Use the task_id to request the Task Result API to retrieve the generated outputs.
Example
Here is an example of how to use the Wan 2.1 Text to Video API.
- Generate a task_id by sending a POST request to the Wan 2.1 Text to Video API.
Request:
Response:
- Use
task_id
to get output videos.
HTTP status codes in the 2xx range indicate that the request has been successfully accepted, while status codes in the 5xx range indicate internal server errors.
You can get videos url in videos
of response.
Request:
Response:
Video files:
Was this page helpful?