> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jiekou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Wanxiang Wan 2.7 Video Editing

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.

<Tip>
  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](/en/docs/models/reference-get-async-task-result) to retrieve the generated result.
</Tip>

## Request Headers

<ParamField header="Content-Type" type="string" required={true}>
  Enum value: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API Key}}.
</ParamField>

## Request Body

<ParamField body="seed" type="integer">
  Random seed, used to improve the reproducibility of generated results. Value range: \[0, 2147483647].

  Value range: \[0, 2147483647]
</ParamField>

<ParamField body="ratio" type="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(1280*720), 9:16(720*1280), 1:1(960*960), 4:3(1104*832), 3:4(832*1104). 1080P supports: 16:9(1920*1080), 9:16(1080*1920), 1:1(1440*1440), 4:3(1648*1248), 3:4(1248*1648).

  Optional values: `16:9`, `9:16`, `1:1`, `4:3`, `3:4`
</ParamField>

<ParamField body="prompt" type="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
</ParamField>

<ParamField body="duration" type="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]
</ParamField>

<ParamField body="video_url" type="string" required={true}>
  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.
</ParamField>

<ParamField body="watermark" type="boolean" default={false}>
  Whether to add a watermark. The watermark is located in the lower-right corner of the video, with fixed text: "AI生成".
</ParamField>

<ParamField body="resolution" type="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`
</ParamField>

<ParamField body="audio_setting" type="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`
</ParamField>

<ParamField body="prompt_extend" type="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.
</ParamField>

<ParamField body="negative_prompt" type="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
</ParamField>

<ParamField body="reference_image_url" type="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.
</ParamField>

<ParamField body="reference_image_url_2" type="string">
  The second reference image URL, with the same format restrictions as reference\_image\_url.
</ParamField>

<ParamField body="reference_image_url_3" type="string">
  The third reference image URL, with the same format restrictions as reference\_image\_url.
</ParamField>

## Response Information

<ResponseField name="task_id" type="string" required={false}>
  Use task\_id to request the [Query Task Result API](/en/docs/models/reference-get-async-task-result) to retrieve the generated output.
</ResponseField>
