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

# PikaH3FlexVideoNode - ComfyUI Built-in Node Documentation

> This node generates a video with synchronized audio from a text prompt, optionally anchored by a first frame, a last frame, or both.

This node generates a video with synchronized audio from a text prompt, optionally anchored by a first frame, a last frame, or both. Pika H3 Flex is Pika's post-trained MiniMax H3 model: it renders the picture and its sound in one pass, and you set the resolution, aspect ratio and duration. With no frame connected the node runs text to video; connecting a frame switches it to image to video.

## Inputs

| Parameter | Description | Data Type | Required | Range |
| - | - | - | - | - |
| `prompt` | What happens in the video, including the sound you want. Must not be empty. Default: "" (empty string). | STRING | Yes | 1 to 8000 characters |
| `first_frame` | Optional image used as the opening frame. Connecting it runs image to video instead of text to video. | IMAGE | No | - |
| `last_frame` | Optional image used as the closing frame. Can be used together with `first_frame` or on its own. | IMAGE | No | - |
| `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 the first connected frame, otherwise the prompt. 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:**

* The prompt must be between 1 and 8000 characters.
* Billing follows the selected resolution and the clip length, counted per second of output.

## Outputs

| Output Name | Description | Data Type |
| - | - | - |
| `VIDEO` | The generated 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/PikaH3FlexVideoNode/en.md)

***

**Source fingerprint (SHA-256):** `63a90fc5874ed861db3c0821e702cfcd1a14650f09459b242b4ec5e3ba5b0cd5`


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