Skip to main content
POST
/
v3
/
async
/
wan-t2v
Wan 2.1 Text-to-Video
curl --request POST \
  --url https://api.highwayapi.ai/v3/async/wan-t2v \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "prompt": "<string>",
  "negative_prompt": "<string>",
  "width": 123,
  "height": 123,
  "loras": [
    {
      "path": "<string>",
      "scale": 123
    }
  ],
  "seed": 123,
  "steps": 123,
  "guidance_scale": 123,
  "flow_shift": 123,
  "enable_safety_checker": true,
  "fast_mode": true
}
'
{
  "task_id": "<string>"
}
Accelerated inference for the Wan 2.1 14B text-to-video model. This is a comprehensive and open video foundation model suite that pushes the boundaries of video generation. By default, the API generates a 5-second video.
This is an asynchronous API and will only return the task_id of the async task. You should use this task_id to request the Get Task Result API to retrieve the video generation result.

Request Headers

Content-Type
string
required
Enum value: application/json
Authorization
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

prompt
string
required
The prompt text used to guide the generation.Value range: [1, 2000].
negative_prompt
string
A negative prompt that instructs the model which elements to avoid generating.Value range: [0, 2000].
width
integer
The width of the output video.Enum values: 480, 720, 832, 1280.Default: 832. If width or height is not specified, width and height will be forced to 832 and 480.
height
integer
The height of the output video.Supported:
  • (480p) When the width is 480, the height is set to 832
  • (480p) When the width is 832, the height is set to 480
  • (720p) When the width is 720, the height is set to 1280
  • (720p) When the width is 1280, the height is set to 720
Default: 480. If width or height is not specified, width and height will be forced to 832 and 480.
loras
object[]
LoRA models applied to video generation.Supports specifying up to 3 LoRA models.
seed
integer
The random seed, a number used by Stable Diffusion to generate noise. Value range: [-1, 9999999999]. Default value: -1.
steps
integer
The number of iteration steps, i.e., the number of iterations in the image creation process. Value range: [1, 40]. Default: 30.
guidance_scale
float
The guidance scaling parameter controls how closely the generated content follows the prompt. Value range: [0, 10]. Default: 5.0.
flow_shift
float
The flow_shift parameter mainly affects the speed and magnitude of object motion in the video. Higher values produce more pronounced and faster motion, while lower values make motion slower and more subtle.Value range: [1, 10]. Default: 5.0.
enable_safety_checker
boolean
The enable_safety_checker parameter controls whether a safety filter is applied to the generated content. When enabled, it helps filter potentially harmful or inappropriate content from the video output.Default: true.
fast_mode
boolean
Whether to enable fast mode, which generates videos faster but may reduce quality and price.Default: false.

Response Information

task_id
string
required
The task_id of the asynchronous task. You should use this task_id to request the Get Task Result API to obtain the generation result