Skip to main content
POST
/
v3
/
async
/
wan2.7-videoedit
Wanxiang Wan 2.7 Video Editing
curl --request POST \
  --url https://api.highwayapi.ai/v3/async/wan2.7-videoedit \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "seed": 123,
  "ratio": "<string>",
  "prompt": "<string>",
  "duration": 123,
  "video_url": "<string>",
  "watermark": true,
  "resolution": "<string>",
  "audio_setting": "<string>",
  "prompt_extend": true,
  "negative_prompt": "<string>",
  "reference_image_url": "<string>",
  "reference_image_url_2": "<string>",
  "reference_image_url_3": "<string>"
}
'
{
  "task_id": "<string>"
}
The Wanxiang Wan 2.7 video editing model supports multimodal inputs (text/images/videos) and can perform instruction-based editing and video transfer tasks. It supports 720P and 1080P resolutions, durations from 2 to 10 seconds, and is billed by the second. The output includes audio by default.
This is an asynchronous API and will only return the task_id of the asynchronous task. You should use this task_id to request the Query Task Result API to retrieve the generated result.

Request Headers

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

Request Body

seed
integer
Random seed, used to improve the reproducibility of generated results. Value range: [0, 2147483647].Value range: [0, 2147483647]
ratio
string
The aspect ratio of the generated video. If not provided, a video with an approximate aspect ratio based on the input video will be generated. 720P supports: 16:9(1280720), 9:16(7201280), 1:1(960960), 4:3(1104832), 3:4(8321104). 1080P supports: 16:9(19201080), 9:16(10801920), 1:1(14401440), 4:3(16481248), 3:4(12481648).Optional values: 16:9, 9:16, 1:1, 4:3, 3:4
prompt
string
Text prompt used to describe the editing operation for the video. Supports Chinese and English, up to 5000 characters. For example, “convert the entire scene to a clay style” or “replace the girl’s clothes in the video with the clothes in the image”.Length limit: 0 - 5000
duration
integer
default:0
The duration of the generated video, in seconds. The default value is 0, which means the duration of the input video is used directly. When an integer between [2,10] is provided, the system clips the original video from 0 seconds to the specified duration. Configure this only when you need to truncate the video.Value range: [0, 10]
video_url
string
required
The URL of the video to be edited. Supported formats: mp4, mov. Duration: 2–10 seconds; resolution width and height range: [240,4096] pixels; aspect ratio: 1:8–8:1; file size no more than 100MB.
watermark
boolean
default:false
Whether to add a watermark. The watermark is located in the lower-right corner of the video, with fixed text: “AI生成”.
resolution
string
default:"1080P"
The output video resolution tier, which affects the cost (1080P > 720P). The video aspect ratio remains consistent with the input material (unless the ratio parameter is specified).Optional values: 720P, 1080P
audio_setting
string
default:"auto"
Video audio setting. auto: the model intelligently determines based on the prompt content; if the prompt involves audio descriptions, it may regenerate audio, otherwise it may preserve the original audio. origin: force preservation of the input video’s original audio.Optional values: auto, origin
prompt_extend
boolean
default:true
Whether to enable intelligent prompt rewriting. When enabled, a large model is used to intelligently rewrite the input prompt, which can significantly improve generation quality for shorter prompts, but will increase processing time.
negative_prompt
string
Negative prompt, used to describe content that you do not want to appear in the video frames. Supports Chinese and English, up to 500 characters.Length limit: 0 - 500
reference_image_url
string
Reference image URL. This can be used to provide visual references needed for editing (such as clothing replacement, style transfer, etc.). Supported formats: JPEG, JPG, PNG (transparent channels are not supported), BMP, WEBP. Resolution width and height range: [240,8000] pixels; aspect ratio: 1:8–8:1; file size no more than 20MB. Up to 3 reference images can be provided.
reference_image_url_2
string
The second reference image URL, with the same format restrictions as reference_image_url.
reference_image_url_3
string
The third reference image URL, with the same format restrictions as reference_image_url.

Response Information

task_id
string
Use task_id to request the Query Task Result API to retrieve the generated output.