Gemini List Available Models
What can my Gemini key actually call? This node answers instead of guessing
- models_text
- models_json
Every Gemini node in this pack ships a dropdown of model IDs - 35 for text, 6 for Veo, a whole wall of them in the Model Selector. Those dropdowns are the pack author's best guess, verified against Google's API at some point. But your account doesn't necessarily have access to all of them. Model access differs by region, by plan, by whether you're on the Developer API or Vertex AI, and Google reshuffles preview IDs constantly. That's the problem this node exists to solve: it asks your API key what you can actually call.
It's a diagnostic you'll use twice - once when you're setting up and getting "model not found" errors, and again whenever a model ID in a dropdown mysteriously stops working. Think of it as the models.list endpoint with a friendly face.
How it works
It opens a Gemini client with your key and calls client.models.list(). For each model it records the name (with the models/ prefix stripped), the display name, a truncated description, and the list of supported actions - like generateContent or generateImages. Then it applies your filter and hands you the results in two formats.
Because it's a live API call, it shows reality, not the pack's assumptions. That's exactly the point: if you're on a plan that can't reach Veo, the Veo models won't be in your list, no matter what the VideoGen dropdown claims.
Inputs and outputs
api_key- your key, or leave blank to fall back to theGEMINI_API_KEYenvironment variable.filter- the one input you'll actually change.alldumps everything;image_generationnarrows to models that can output images (it looks for "image" in the name or supported methods);text_onlyandmultimodalslice it the other way.
The node has two outputs, both STRING:
models_text- a human-readable list:model-name | display name | [supported actions], one per line. Perfect for eyeballing.models_json- the same data as formatted JSON, with names, display names, descriptions, and methods. Wire this into a JSON-parsing or logging node if you want to do something programmatic with it.
How to install it
Pack-level install, like every node in ComfyUI-API-Toolkit:
cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-API-Toolkit
cd ComfyUI-API-Toolkit
pip install -r requirements.txt
or search "API Toolkit" in ComfyUI Manager and restart. Needs google-genai>=0.8.0, plus a Gemini API key. There's nothing to download - this node is a query, not a model.
Common issues
The obvious failure: an empty or erroring result means your key itself is the problem - wrong key, no billing, or the key's region blocks API access. Sort the key first, then suspect the node.
The genuinely useful habit: when another Gemini node spits out "model not found" or a 404-style error on a preview ID, run this node, find the working ID for your account, and paste it into that node's custom_model override. Preview model IDs are the most volatile thing in this whole pack, and this node is the fastest way to discover what replaced the one you were using.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | Gemini API key. Leave blank to use GEMINI_API_KEY env var. | |
| filteropt | COMBO | all | Filter by capability. 'image_generation' shows only models that can output images. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| models_text | STRING | — |
| models_json | STRING | — |