05 Gemini List Models
Finding out what your Gemini key can actually reach
- session
- json
- models
- indexed
05 Gemini List Models asks the ZMongo backend to list the Gemini models your account can access, and hands them back as a ComfyUI-friendly list. It's the discovery node: instead of guessing model names from blog posts, you ask the server what's actually available to your key right now.
Why you'd reach for it: the Gemini family is a moving target. Model names change (2.5-flash became a workhorse, image-capable models came along, the defaults in these nodes may not match your account's access), and a typo'd or retired model string is one of the most common ways a Gemini workflow fails. List Models turns "I hope this model name is right" into "here's what exists."
How it works
One required input, session (from the 00 API Key Session node), plus the usual gemini_prefix and refresh_token options. It GETs /gemini/api/models and parses the model names out of the payload. Outputs:
json- the raw backend response.models- a wildcard list output of model name strings. Feed it into a selector node and you can pick a model by index from the live list, which is the robust way to wire a model choice into a workflow.indexed- the same models as a numbered string (0: gemini-2.5-flash,1: ...), handy for reading or for feeding text-based selectors.
Using it well
- The selector pattern. Because
modelsis a real list output, you can chain List Models → a "select Nth" node → feed the chosen string intomodelon any Gemini node. Your workflow then always uses a model that actually exists, instead of a hardcoded name that might not. - Troubleshooting companion. When 05 Test Gemini API Key fails on a specific model, run List Models alongside it: if the model isn't in the list, the failure is access, not the key. If it is in the list, the problem is elsewhere.
- Discover the defaults. The pack's default model strings (
gemini-2.5-flash,gemini-3.1-flash-image) are assumptions; List Models tells you what your server/account actually resolves. Don't be surprised if the available set differs from the defaults.
Install
ComfyUI Manager → ComfyUI-ZMongo, or:
cd ComfyUI/custom_nodes
git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo
then restart. Read-only thin client - needs only the API session, and the server does the talking to Google.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| session | ZMONGO_API_SESSION | — | |
| gemini_prefixopt | STRING | /gemini | — |
| refresh_tokenopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| json | STRING | — |
| models | * | — |
| indexed | STRING | — |