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

# Wan2VideoEditApi - ComfyUI Built-in Node Documentation

> Complete documentation for the Wan2VideoEditApi node in ComfyUI. Learn its inputs, outputs, parameters and usage.

The Wan2VideoEditApi node uses the Wan 2.7 model to edit a video based on text instructions, reference images, or style transfer. It processes the input video and generates a new video according to the specified parameters like resolution, duration, and aspect ratio.

## Inputs

| Parameter                | Description                                                                                                                                          | Data Type | Required | Range                                                                                                        |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------- | ------------------------------------------------------------------------------------------------------------ |
| `model`                  | The model to use for video editing.                                                                                                                  | COMBO     | Yes      | `"wan2.7-videoedit"`                                                                                         |
| `model.prompt`           | Editing instructions or style transfer requirements. (default: empty string)                                                                         | STRING    | Yes      | -                                                                                                            |
| `model.resolution`       | The resolution for the output video.                                                                                                                 | COMBO     | Yes      | `"720P"`<br />`"1080P"`                                                                                      |
| `model.ratio`            | The aspect ratio for the output video. If not changed, it approximates the input video's ratio.                                                      | COMBO     | Yes      | `"16:9"`<br />`"9:16"`<br />`"1:1"`<br />`"4:3"`<br />`"3:4"`                                                |
| `model.duration`         | The output duration in seconds. 'auto' matches the input video duration. A specific value truncates from the start of the video. (default: "auto")   | COMBO     | Yes      | `"auto"`<br />`"2"`<br />`"3"`<br />`"4"`<br />`"5"`<br />`"6"`<br />`"7"`<br />`"8"`<br />`"9"`<br />`"10"` |
| `model.reference_images` | A list of up to 4 reference images to guide the edit.                                                                                                | IMAGE     | No       | -                                                                                                            |
| `video`                  | The video to edit.                                                                                                                                   | VIDEO     | Yes      | -                                                                                                            |
| `seed`                   | The seed to use for generation. (default: 0)                                                                                                         | INT       | No       | 0 to 2147483647                                                                                              |
| `audio_setting`          | 'auto': model decides whether to regenerate audio based on the prompt. 'origin': preserve the original audio from the input video. (default: "auto") | COMBO     | No       | `"auto"`<br />`"origin"`                                                                                     |
| `watermark`              | Whether to add an AI-generated watermark to the result. (default: False)                                                                             | BOOLEAN   | No       | -                                                                                                            |

**Constraints:**

* The `model.prompt` must be at least 1 character long.
* The input `video` must be between 2 and 10 seconds in duration.
* The `model.reference_images` input can accept a maximum of 4 images.

## Outputs

| Output Name | Description                              | Data Type |
| ----------- | ---------------------------------------- | --------- |
| `output`    | The edited video generated by the model. | VIDEO     |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/Wan2VideoEditApi/en.md)

***

**Source fingerprint (SHA-256):** `27283273ee56c90903db103a3e9bc17dc4df0914676c9aedd2a115b07937dc10`
