Nodes/ComfyUI API Toolkit/Gemini Video Generation (Gemini Omni)
ComfyUI Node

Gemini Video Generation (Gemini Omni)

Generate a Clip, Then Keep Editing It

By IxMxAMAR·Created 7 months ago·Updated 23 days ago· 1
Gemini Video Generation (Gemini Omni)
  • image
  • video_file_path
  • interaction_id
◄api_key►
◄modelgemini-omni-1.1-flash►
◄prompt►
◄custom_model►
◄video_uri►
◄previous_interaction_id►
◄aspect_ratio16:9►
◄resolution720p►
◄deliverybase64►
◄timeout_seconds600►

Most video nodes in ComfyUI are one-shot: prompt in, clip out, and if you want a change you start over. This one is conversational. Generate a clip, look at it, then feed its interaction_id back into the next call with "make it rain" and it edits that video instead of making a new one from scratch. That chaining behaviour is the whole point, and it's what separates Omni from the pack's separate Veo node.

It runs on Gemini Omni Flash through Google's Interactions API, which means two things up front: it's closed and metered (no local equivalent exists - video is the one modality where open weights still haven't caught the frontier), and your prompt plus every reference image you wire in goes to Google's servers.

One node, several jobs

The image input is an IMAGE and its behaviour is overloaded, deliberately. The tooltip lays out the contract: one image makes it a start frame, two gives you first and last frame interpolation, and more than two gets read as subject references. There's no separate mode switch - the count of images is the mode, and your prompt tells the model how to use them. That's flexible and slightly spooky the first time, because wiring in a third image silently changes what the node is doing.

video_uri takes a Files API URI for footage you've uploaded to Google, up to 10 seconds of input, and lets you edit or extend existing video. previous_interaction_id is the conversational half: paste the interaction_id from an earlier call and this run edits the resulting video. Chain three nodes and you've got an edit timeline where every step is a sentence.

The rest are settings you'll mostly leave alone. aspect_ratio is 16:9 or 9:16 only. resolution gives you 720p, 360p, 1080p or 4k. model offers exactly one entry, gemini-omni-1.1-flash, with custom_model as the escape hatch when Google ships something new before the pack catches up. timeout_seconds defaults to 600 and caps at 1800 - video jobs are slow, and this is how long the node will sit on the line.

And delivery is the one that will actually bite you. base64 returns the video inline and has a hard size ceiling around 4 MB, which longer or higher-resolution clips will blow through. uri fetches it through the Files API instead and handles bigger files; the node then polls the file's state until it's ACTIVE before downloading.

Outputs, honestly

video_file_path is a STRING - a real .mp4 written into ComfyUI's output directory. It is not an IMAGE or VIDEO tensor, so it won't plug straight into a video-combine node. You have two reasonable routes: copy it into ComfyUI's input folder and load it with the pack's own Kling Video Loader, which lists videos from the input directory, or push the path through the pack's Raw File Saver node. Slightly awkward, and worth knowing before you stare at red wires.

interaction_id is the second output, and its only consumer is the next Omni node's previous_interaction_id.

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-API-Toolkit
cd ComfyUI-API-Toolkit
pip install -r requirements.txt

Gemini needs google-genai 2.3.0 or newer - the Interactions API that Omni, Lyria and the newer TTS models use requires it. That's stricter than it looks: an older google-genai sitting in your environment from another pack is a real failure mode, and the fix is upgrading it, not reinstalling this pack. GEMINI_API_KEY in your environment works as a fallback for the key field, and if the SDK isn't installed at all the Gemini service simply doesn't load - everything else in the pack keeps working.

When it breaks

"Gemini Omni returned no video." The call completed and produced nothing usable. Re-word the prompt and try again; a refusal or a filter trip surfaces here rather than as a clean error.

Timeout on a long job. Raise timeout_seconds before you assume the node is broken - 1800 is the ceiling, and a 4K clip can want all of it.

A 4 MB wall on a big clip. That's delivery set to base64. Switch to uri.

The charge. Video on these APIs is priced by the second and the resolution, and it's the single most expensive thing you can do in a Comfy graph. Prototype at 360p, verify the edit chain works, then spend on the real take.

CategoryAPI Toolkit/Gemini/Video

Inputs (11)

NameTypeDefaultDescription
api_keySTRING—
modelCOMBOgemini-omni-1.1-flash1 options: gemini-omni-1.1-flash
promptSTRING—
custom_modeloptSTRING—
imageoptIMAGEOptional image(s): one = start frame, two = first and last frame, more = subject references. The prompt says how to use them.
video_urioptSTRINGFiles API URI of an uploaded video to edit or extend. Inputs up to 10 seconds.
previous_interaction_idoptSTRINGinteraction_id of an earlier Omni call; the prompt then edits that video.
aspect_ratiooptCOMBO16:92 options: 16:9, 9:16
resolutionoptCOMBO720p4 options: 720p, 360p, 1080p, 4k
deliveryoptCOMBObase64base64 returns the video inline (about 4 MB limit). uri downloads it through the Files API and supports larger videos.
timeout_secondsoptINT60060–1800Max time to wait for the video.

Outputs (2)

NameTypeDescription
video_file_pathSTRING—
interaction_idSTRING—