Gemini Chat
The multimodal Swiss army knife of this pack
- image
- audio
- response
If you install one node from this pack, it should probably be this one. Gemini Chat is the flexible utility that ties the whole thing together: it's a full Gemini LLM call that accepts text, an image, and even audio, and hands back a plain string. That makes it a prompt-rewriter, an image captioner, an audio transcriber, and a workflow "brain" all in one node - the thing you use to generate a better prompt for your local SDXL render, or to describe what's actually in that reference photo.
The KB's framing of Gemini is that it's the Google multimodal workhorse, and this node exposes exactly that: one input for a prompt, one optional image, one optional audio, one response string out. It's the least surprising node in the pack and the most reusable.
How it works
It uses the google-genai SDK - same genai.Client as the pack's other Google nodes - and calls models.generate_content() with your prompt plus whatever image or audio you attached (converted to inline parts in memory). Two switches add real capability: google_search attaches the Grounding with Google Search tool, letting the model answer with live web context, and url_context enables grounding on the URL content you point it at. thinking turns on the model's reasoning mode, with thinking_budget controlling how much it thinks.
The inputs that matter
- prompt - the instruction. With an image attached, this becomes "describe this" / "what's wrong with this pose" / "write a prompt for a similar image."
- model - eleven choices spanning the Gemini 2.5 and 3.x lines.
gemini-2.5-flashis the sensible default;gemini-2.5-prowhen you need the smartest answer; the flash-lite variants when you want it cheap and fast. - temperature (default 0.2) and top_p (default 0.95) - keep temperature low for captioning/prompt-rewriting so you get stable output.
- thinking - on/off. Off by default; flip it on for harder reasoning tasks and set
thinking_budget(with-1= auto,0= disabled). - google_search / url_context - the grounding switches.
google_searchis the one you'll actually use; it makes answers current and factual but adds latency and can fail on quota. - system_instruction (optional) - the "you are a prompt engineer" role-setting field. Underrated; use it.
- image and audio (optional) - attach either (or both) to the same call.
- seed / api_key - key in the field or
.env(GEMINI_API_KEY).
The output
response - a STRING. Wire it into any text input elsewhere: a prompt encoder, another node's prompt field, or a save-text node.
Installing it
One of ~20 nodes in the Aryan185/ComfyUI-ExternalAPI-Helpers pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Aryan185/ComfyUI-ExternalAPI-Helpers.git
cd ComfyUI-ExternalAPI-Helpers
pip install -r requirements.txt
Restart ComfyUI; find it under text/generation. The google-genai dependency is the one that matters. Grab a free key at aistudio.google.com/app/api-keys, paste it in or set GEMINI_API_KEY in .env (copy .env.example).
Where people get burned
The google_search toggle is the classic trap - flip it on, get an API error about the search tool, and blame the node. Search grounding is quota-limited and sometimes needs the tool enabled on the model; if it errors, turn it off rather than debugging. Also, with thinking on, responses can take noticeably longer and cost more - use it for the hard questions, not every call. And remember the seed is for ComfyUI caching here, same as the rest of the pack, so if a re-run gives you a different caption that's expected.
Real talk: this node is the reason to keep the pack installed even if you never touch the flashier image/video nodes. It's the glue.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| api_key | STRING | Directly put Gemini API key or .env variable name (GEMINI_API_KEY) | |
| model | COMBO | gemini-3.5-flash | 11 options: gemini-3.6-flash, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-3.1-pro-preview, gemini-3.1-flash-lite, gemini-3-flash-preview, +5 |
| temperature | FLOAT | 0.20–2 | — |
| top_p | FLOAT | 0.950–1 | — |
| thinking | BOOLEAN | false | — |
| google_search | BOOLEAN | false | — |
| url_context | BOOLEAN | false | — |
| seed | INT | 69-1–2147483646 | — |
| system_instructionopt | STRING | — | |
| thinking_budgetopt | INT | 0-1–24576 | -1 = auto, 0 = disabled |
| imageopt | IMAGE | — | |
| audioopt | AUDIO | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| response | STRING | — |