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

# Wan2ReferenceVideoApi - ComfyUI Built-in Node Documentation

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

This node generates a video featuring a person or object based on provided reference materials. It uses the Wan 2.7 model to create videos from a text prompt, supporting single-character performances and multi-character interactions. You must provide at least one reference video or image for the generation to work.

## Inputs

| Parameter                | Description                                                                                                              | Data Type | Required | Range                                                         |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------ | --------- | -------- | ------------------------------------------------------------- |
| `model`                  | The specific model to use for video generation.                                                                          | COMBO     | Yes      | `"wan2.7-r2v"`                                                |
| `model.prompt`           | Prompt describing the video. Use identifiers such as 'character1' and 'character2' to refer to the reference characters. | STRING    | Yes      | -                                                             |
| `model.negative_prompt`  | Negative prompt describing what to avoid in the generated video (default: empty).                                        | STRING    | No       | -                                                             |
| `model.resolution`       | The resolution of the output video.                                                                                      | COMBO     | Yes      | `"720P"`<br />`"1080P"`                                       |
| `model.ratio`            | The aspect ratio of the output video.                                                                                    | COMBO     | Yes      | `"16:9"`<br />`"9:16"`<br />`"1:1"`<br />`"4:3"`<br />`"3:4"` |
| `model.duration`         | The length of the generated video in seconds (default: 5).                                                               | INT       | Yes      | 2 to 10                                                       |
| `model.reference_videos` | A list of reference videos. You can add up to 3 videos.                                                                  | VIDEO     | No       | -                                                             |
| `model.reference_images` | A list of reference images. You can add up to 5 images.                                                                  | IMAGE     | No       | -                                                             |
| `seed`                   | Seed to use for generation, which helps control the randomness of the output (default: 0).                               | INT       | No       | 0 to 2147483647                                               |
| `watermark`              | Whether to add an AI-generated watermark to the result (default: False). This is an advanced setting.                    | BOOLEAN   | No       | -                                                             |

**Important Constraints:**

* You must provide at least one reference video or reference image in the `model.reference_videos` or `model.reference_images` inputs.
* The total combined number of reference videos and images cannot exceed 5.

## Outputs

| Output Name | Description               | Data Type |
| ----------- | ------------------------- | --------- |
| `output`    | The generated video file. | 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/Wan2ReferenceVideoApi/en.md)

***

**Source fingerprint (SHA-256):** `52ac550522bf3fe8f57444ce8586fe83be470b893ff8c01292743553cfbd623d`
