05 Gemini Key Status
The read-only check before you trust the Gemini nodes
- session
- json
- has_key
- masked_key
05 Gemini Key Status asks the ZMongo backend, "is there a Gemini API key registered for this account, and what does it look like?" It's the cheapest possible sanity check before you build a Gemini workflow - one run and you know whether you need to call 05 Save Gemini API Key first.
This is a boring node, and that's its virtue. Every "my Gemini node returned an auth error" story in this pack starts with a missing or wrong key on the server. A 10-second Status check answers "did the key get saved at all?" before you spend an hour chasing a prompt problem that was really a credentials problem.
How it works
One required input, session (from the 00 API Key Session node), plus the optional gemini_prefix (default /gemini) and refresh_token that every Gemini node carries. It GETs /gemini/api/key/status and surfaces three outputs:
has_key- boolean. The headline.truemeans a key is registered server-side;falsemeans every Gemini call from here will fail on auth.masked_key- the server's masked preview (AIza...xyz) if a key exists, empty otherwise. Confirms which key is on file without exposing it.json- the raw status payload, for when you want the details behindhas_key.
Using it well
- As a workflow gate. Since
has_keyis a real BOOLEAN output, you can feed it into a switch or condition upstream: "only run the Gemini nodes if a key exists." It turns a failure into a graceful skip. - In a one-off test graph. Drop Status into a scratch workflow, wire the session in, run, read
has_key. Iffalse, go save a key. Two minutes, done. - Remember what it doesn't tell you.
has_keymeans a key string is stored - it does not verify the key is valid, unexpired, or has quota. That's what 05 Test Gemini API Key is for. Status and Test are complementary: Status asks "is one saved?", Test asks "does it work?"
Install
ComfyUI Manager → ComfyUI-ZMongo, or:
cd ComfyUI/custom_nodes
git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo
then restart. Like all the Gemini nodes here, this is a thin HTTP client - it needs the API session and nothing else, even though the pack's full requirements.txt installs a lot more on first import.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| session | ZMONGO_API_SESSION | — | |
| gemini_prefixopt | STRING | /gemini | — |
| refresh_tokenopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| json | STRING | — |
| has_key | BOOLEAN | — |
| masked_key | STRING | — |