Nodes/ComfyUI-ZMongo/05 Gemini Key Status
ComfyUI Node

05 Gemini Key Status

The read-only check before you trust the Gemini nodes

By CentralFloridaAttorney·Created 5 months ago·Updated 2 months ago· 1
05 Gemini Key Status
  • session
  • json
  • has_key
  • masked_key
gemini_prefix/gemini
refresh_token

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. true means a key is registered server-side; false means 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 behind has_key.

Using it well

  • As a workflow gate. Since has_key is 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. If false, go save a key. Two minutes, done.
  • Remember what it doesn't tell you. has_key means 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.

CategoryZMongo/06 Gemini

Inputs (3)

NameTypeDefaultDescription
sessionZMONGO_API_SESSION
gemini_prefixoptSTRING/gemini
refresh_tokenoptSTRING

Outputs (3)

NameTypeDescription
jsonSTRING
has_keyBOOLEAN
masked_keySTRING