> ## 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.

# Kling 4.0 Edit Video - ComfyUI Built-in Node Documentation

> Edits an existing video with a text prompt using the Kling 4.0 model, optionally guided by reference videos and reference images.

Edits an existing video with a text prompt using the Kling 4.0 model, optionally guided by reference videos and reference images. The result keeps the length of the input video. Use it to change what happens in a clip, restyle it, or swap elements while the original timing stays intact.

## Inputs

### Common Inputs

| Parameter | Description | Data Type | Required | Range |
| - | - | - | - | - |
| `model` | Model selector. Only `"kling-4.0"` is available; selecting it reveals the inputs below. | DYNAMIC\_COMBO | Yes | `"kling-4.0"` |

### kling-4.0 Inputs

These inputs appear when `model` is set to `"kling-4.0"`.

| Parameter | Description | Data Type | Required | Range |
| - | - | - | - | - |
| `video_1` | The video to edit, 3 to 30 seconds long. The output keeps its length. | VIDEO | Yes | 3 to 30 seconds |
| `reference_videos` | Growable slots for reference videos, up to 4. Refer to them in the prompt as `@Video2` and so on. Each video and all videos together must be 3 to 30 seconds long. | AUTOGROW | No | 0 to 4 videos |
| `reference_images` | Growable slots for reference images, up to 10. Refer to them in the prompt as `@Image1`, `@Image2` and so on. | AUTOGROW | No | 0 to 10 images |
| `prompt` | Description of what to change and what to keep. Refer to the video being edited as `@Video1`, the reference videos as `@Video2` and so on, and the images as `@Image1` and so on. | STRING | Yes | 1 to 26000 characters |
| `resolution` | Resolution of the output video. Default: `"720p"`. | COMBO | Yes | `"720p"` `"1080p"` |
| `aspect_ratio` | Aspect ratio of the output video. `"adaptive"` keeps the aspect ratio of the input video. Default: `"adaptive"`. | COMBO | Yes | `"adaptive"` `"16:9"` `"9:16"` `"1:1"` `"21:9"` |
| `seed` | Seed controls whether the node should re-run; results are non-deterministic regardless of seed. Default: 42. | INT | Yes | 0 to 2147483647 |

**Constraints and behavior:**

* The input video and every reference video must be 3 to 30 seconds long, at least 700x700 and at most 4553x4553 pixels, no more than 8,294,400 pixels in total, with an aspect ratio between 2:5 and 5:2 and a frame rate of at least 24 fps. All videos together must not exceed 30 seconds.
* Every reference image must be at least 300x300 pixels with an aspect ratio between 2:5 and 5:2, and at most 10 images can be connected.
* A prompt that mentions `@VideoN` or `@ImageN` raises an error when fewer than N inputs of that kind are connected.

## Outputs

| Output Name | Description | Data Type |
| - | - | - |
| `video` | The edited video, downloaded from the provider once the task completes. It has the same length as the input video. | 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/Kling4EditVideoNode/en.md)

***

**Source fingerprint (SHA-256):** `00e8de2529df9be6bc1fae5f2c2beda01f151143448e91b79f9cfb27436064ff`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.