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

# PikaH3FlexReferenceVideoNode - ComfyUI Built-in Node Documentation

> This node generates or edits a video with synchronized audio, guided by reference images, videos and audio clips.

This node generates or edits a video with synchronized audio, guided by reference images, videos and audio clips. Pika H3 Flex is Pika's post-trained MiniMax H3 model. Connect references and address them in the prompt as `@Image1`, `@Video1` or `@Audio1` in connection order. At least one reference image or video is required, and a maximum of 12 references can be connected in total.

## Inputs

| Parameter | Description | Data Type | Required | Range |
| - | - | - | - | - |
| `reference_images` | Up to 9 images, addressed in the prompt as `@Image1` to `@Image9` in connection order. At least one image or video is required. | AUTOGROW | No | 0 to 9 images |
| `reference_videos` | Up to 3 clips, addressed in the prompt as `@Video1` to `@Video3` in connection order. Each clip must be 2 to 15 seconds and the clips must total 15 seconds or less. Billed per second. | AUTOGROW | No | 0 to 3 videos |
| `reference_audios` | Up to 3 clips, addressed in the prompt as `@Audio1` to `@Audio3`. Each clip must be 2 to 15 seconds and the clips must total 15 seconds or less. When copied to the output, clips play in connection order, ahead of the sound of connected videos. | AUTOGROW | No | 0 to 3 audio clips |
| `prompt` | What to generate, or the edit to make. Refer to references as `@Image1`, `@Video1`, `@Audio1`, or as `<Picture 1>`, `<Video 1>`, `<Audio 1>`. Must not be empty. Default: "" (empty string). | STRING | Yes | 1 to 8000 characters |
| `reference_video_audio` | Copy the sound of connected videos to the output. Turn it off for new ambience or for motion transfer with new music. A talking head with no dialogue in the prompt then gets invented speech. Default: True. | BOOLEAN | Yes | true false |
| `resolution` | Output resolution. `"1080p"` and above render at 768p and upscale once. The same seed at 480p gives a different video. Default: `"768p"`. | COMBO | Yes | `"480p"` `"768p"` `"1080p"` `"2k"` `"4k"` |
| `aspect_ratio` | Output aspect ratio. `"auto"` follows a reference video, otherwise the prompt. Reference images do not affect it. Default: `"auto"`. | COMBO | Yes | `"auto"` `"21:9"` `"16:9"` `"3:2"` `"4:3"` `"5:4"` `"1:1"` `"4:5"` `"3:4"` `"2:3"` `"9:16"` `"9:21"` |
| `duration` | Clip length in seconds. The output length follows a frame grid: 5 seconds gives 124 frames, about 5.17 seconds. Default: 5. | INT | Yes | 5 to 15 seconds |
| `rewrite_prompt` | Let Pika expand the prompt first. The same seed then gives a different video on each run. Default: False. | BOOLEAN | Yes | true false |
| `seed` | Seed for sampling. With `rewrite_prompt` off, the same seed repeats the video exactly, though a local run with the same seed gives a different result. Default: 42. | INT | Yes | 0 to 2147483647 |

**Constraints:**

* At least one reference image or video is required.
* A maximum of 12 references can be connected in total, counting images, videos and audio clips together.
* Each reference video and audio clip must be 2 to 15 seconds; the videos must total 15 seconds or less, and the audio clips 15 seconds or less.
* The prompt must be between 1 and 8000 characters.
* Referencing a slot that is not connected, such as `@Image3` with two images supplied, raises an error.

## Outputs

| Output Name | Description | Data Type |
| - | - | - |
| `VIDEO` | The generated or edited clip with its synchronized audio. | 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/PikaH3FlexReferenceVideoNode/en.md)

***

**Source fingerprint (SHA-256):** `c6d8700e3bb0c4ed7663aff55d477314af566568bd6db353fc21d6249ddd93bd`


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