NanoBanana - List Available Models
Find out what your API key can actually access
- network
- models_text
- models_json
The model dropdowns in this pack are static - they're baked in when ComfyUI loads. But what your API key can actually call depends on your account tier, region, and whatever Google changed last week. A preview model on the list may 400 for you, or a model you have access to may not be on the list yet. This node closes that gap: it queries the Gemini API live with your key and returns the models that genuinely exist for your account.
It's the diagnostic you reach for when something "should work" but doesn't - and the answer to "what do I put in the custom_model override field."
How it works
The node calls client.models.list() with your key and builds a record per model: the name (with the models/ prefix stripped), display name, a description snippet, and the generation methods it supports. Then a filter dropdown narrows the list:
all- everythingimage_generation- only models that can output images (name or supported methods mention image/imagen)text_only- names that don't mention image or visionmultimodal- gemini-prefixed models
You get two outputs. models_text is the human-readable list - model-name | display name | [supported methods] per line, ready for a text display node. models_json is the same data as a JSON string, for anything programmatic.
The methods column is the useful bit: it tells you how a model is called (generateContent, predict, predictLongRunning, embedContent), which is exactly the information you need when you're deciding whether to stick it in a custom_model field on an ImageGen node versus an Imagen node versus a text node. The two endpoints genuinely differ - Nano Banana models run on generate_content, Imagen on the predict-style generate_images endpoint - and the wrong pairing is a silent failure mode.
Installation
Part of the NanoBanana2 pack:
cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-NanoBanana2
pip install google-genai
Or search NanoBanana2 in ComfyUI Manager. Needs an API key from aistudio.google.com.
Gotchas
The list reflects your key's access, which is regional and tier-dependent - so two people running the same workflow can legitimately see different lists. That's not a bug, that's the feature. And because it makes a live API call every time it runs (the whole pack re-executes on every queue), don't put this in a hot loop; it's a check-when-something-breaks node, not a permanent resident of a production graph.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | NanoBanana - 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. |
| networkopt | NB_NETWORK | Optional. Wire a NanoBanana - Network Route node here to route this request through that proxy (e.g. US egress). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| models_text | STRING | — |
| models_json | STRING | — |