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

> This node generates a video featuring a person or object based on provided reference materials.

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 reference image for the generation to work.

## Inputs

### Common Inputs

| Parameter | Description | Data Type | Required | Range |
| - | - | - | - | - |
| `model` | The specific model to use for video generation. | DYNAMIC\_COMBO | Yes | "wan2.7-r2v" |
| `seed` | Seed to use for generation, which helps control the randomness of the output (default: 0). | INT | Yes | 0 to 2147483647 |
| `watermark` | Whether to add an AI-generated watermark to the result (default: False). This is an advanced setting. | BOOLEAN | Yes | True<br />False |

### wan2.7-r2v Inputs

| Parameter | Description | Data Type | Required | Range |
| - | - | - | - | - |
| `prompt` | Prompt describing the video. Use identifiers such as 'character1' and 'character2' to refer to the reference characters. Must contain at least one character. | STRING | Yes | - |
| `negative_prompt` | Negative prompt describing what to avoid (default: empty). | STRING | No | - |
| `resolution` | The resolution of the output video. | COMBO | Yes | "720P"<br />"1080P" |
| `ratio` | The aspect ratio of the output video. | COMBO | Yes | "16:9"<br />"9:16"<br />"1:1"<br />"4:3"<br />"3:4" |
| `duration` | The length of the generated video in seconds (default: 5). | INT | Yes | 2 to 10 |

### Reference Inputs

| Parameter | Description | Data Type | Required | Range |
| - | - | - | - | - |
| `reference_videos` | Growable slot: connect up to 3 reference videos (slots `video1` to `video3`). At least one reference video or image is required overall. | VIDEO | No | 0 to 3 items |
| `reference_images` | Growable slot: connect up to 5 reference images (slots `image1` to `image5`). At least one reference video or image is required overall. | IMAGE | No | 0 to 5 items |

**Important Constraints:**

* You must provide at least one reference video or reference image in the `reference_videos` or `reference_images` inputs. Otherwise the node raises an error.
* The total combined number of reference videos and reference images cannot exceed 5.
* The `prompt` input must contain at least one character.

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


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