Nodes/ComfyUI-ZMongo/05 Save Gemini API Key
ComfyUI Node

05 Save Gemini API Key

Where your Gemini key actually lives in ZMongo

By CentralFloridaAttorney·Created 5 months ago·Updated 2 months ago· 1
05 Save Gemini API Key
  • session
  • json
  • success
  • masked_key
gemini_api_key
gemini_prefix/gemini

05 Save Gemini API Key uploads your Google Gemini API key to the ZMongo backend so the pack's Gemini nodes can use it. Before any "Gemini Chat", "Gemini Image + Text", or "Gemini JSON" node works, this - or its Status sibling confirming a key exists - needs to have run at least once.

Read that first sentence again, because it's the part people miss: the Gemini nodes in this pack don't call Google directly. They talk to the ZMongo API, and the ZMongo API talks to Gemini on the server side. Your Gemini key is stored on their server, not on your machine. That's the architecture, and it has real privacy implications we'll get to.

How it works

Required inputs:

  • session - from the 00 API Key Session node. Yes, the Gemini nodes ride the same authenticated session as the database nodes.
  • gemini_api_key - your AIza... key, pasted in.

Optional gemini_prefix defaults to /gemini - the URL prefix the backend routes on. You won't touch it unless your server is configured differently.

It POSTs the key to /gemini/api/key/save. Outputs:

  • json - the backend response.
  • success - boolean, whether the save worked.
  • masked_key - the server's masked preview of what it stored (something like AIza...xyz), so you can confirm the right key went in without it ever coming back in plaintext.

The honest takes

  • Your key is on a third-party server. Before you save a key that has quota/cost attached, think about whether you're comfortable with a hosted intermediary holding it. This is a legitimate design for teams (one key, shared across rigs) but it is not "run Gemini locally." If local-first LLM calling is the goal, a node pack that calls the Gemini API directly from your machine is the alternative.
  • A saved key can outlive you on that server. There's a Delete Gemini API Key node for a reason - if you stop using ZMongo, revoke the key in Google's console too. Never assume deleting locally removes it server-side.
  • The key never appears in your workflow JSON - a genuine plus over the API Key Session node, which holds the ZMongo key in plaintext. Google's key lives in masked_key only after save.

Install

Via ComfyUI Manager (search ComfyUI-ZMongo) or:

cd ComfyUI/custom_nodes
git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo

then restart. The pack's requirements.txt is heavy, but the Gemini nodes are thin HTTP clients - everything Gemini-related happens server-side, so don't expect a local google-genai dependency to do the work here.

CategoryZMongo/06 Gemini

Inputs (3)

NameTypeDefaultDescription
sessionZMONGO_API_SESSION
gemini_api_keySTRING
gemini_prefixoptSTRING/gemini

Outputs (3)

NameTypeDescription
jsonSTRING
successBOOLEAN
masked_keySTRING