Gemini API Config
The key plumber for every Gemini node
- client
The Gemini side of the ERPK pack starts here: this node initializes the API client and hands a GEMINI_API_CLIENT out on its single output. Wire it into Gemini Text Generation, Gemini Vision, Gemini Detect, whatever - each of those nodes then selects its own model, so the config node is pure plumbing: "here is a valid, authenticated client; pick your own model downstream."
Here's the pleasant part: it's optional everywhere. Every Gemini node in the pack resolves your API key from Settings > ERPK > API Keys (or right-click canvas → ERPK Settings) and runs standalone if you leave client unconnected. The config node only exists to make the graph explicit - which is genuinely useful when you want one obvious place to see "yes, this workflow is authenticated," or when you want to chain a safety settings node between it and the generators.
How it works
It has no inputs - you read that right, the info schema is empty on the input side. On execution it builds a Gemini client (from the key resolved in Settings, or from gemini/config.ini as fallback), prints a confirmation, and emits the client. The key resolution priority is: ComfyUI Settings > node/widget > config.ini - first non-empty wins. Keys stored in Settings live in your user profile, not in the workflow file, so sharing the graph doesn't leak credentials.
Output
One output, client (GEMINI_API_CLIENT) - wire it into any Gemini node's client input. You can also run it into Gemini Safety Settings or Gemini System Instruction, which pass the client through while attaching config, then into the actual generator.
Install
Part of the ERPK Collection:
cd ComfyUI/custom_nodes
git clone https://github.com/eRepublik-Labs/comfyui-nodes-erpk.git erpk
cd erpk && pip install -r requirements.txt
Restart (or ComfyUI Manager → search erpk → ERPK Custom Nodes), then get a Google API key from aistudio.google.com and put it in Settings > ERPK > API Keys. The pack needs google-genai>=2.2.0, which the requirements file pulls in.
The classic confusion is expecting this node to pick a model - it can't, and doesn't need to. If your output looks wrong, the model dropdown lives on each generation/vision node, not here. And if you're only using one Gemini node, you can skip this entirely; it exists for explicit graphs and for chaining safety/system nodes, not because it's mandatory.
Inputs (0)
No inputs
Outputs (1)
| Name | Type | Description |
|---|---|---|
| client | GEMINI_API_CLIENT | — |