Skip to main content
POST
/
v3
/
async
/
wan-i2v
Wan 2.1 Image-to-Video
curl --request POST \
  --url https://api.highwayapi.ai/v3/async/wan-i2v \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "prompt": "<string>",
  "image_url": "<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 image-to-video model, 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 only returns the task_id of the asynchronous 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 desired generation.Value range: [1, 2000].
image_url
string
required
The image URL used for video generation.
negative_prompt
string
The negative prompt tells 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 width is 480, height is set to 832
  • (480p) When width is 832, height is set to 480
  • (720p) When width is 720, height is set to 1280
  • (720p) When width is 1280, height is set to 720
Default: 480. If width or height is not specified, width and height will be forced to 832 and 480.
The output video will preserve the aspect ratio of the input image. The width x height setting only determines the clarity of the output video. For example, a 720p video will be clearer than a 480p video.
loras
object[]
LoRA models applied to video generation.Supports specifying up to 3 LoRA models.
seed
integer
Random seed, the number used by Stable Diffusion to generate noise. Value range: [-1, 9999999999]. Default value is -1.
steps
integer
Number of iteration steps, 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 noticeable 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 to apply a safety filter 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 will generate 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