JAS Nano Banana Text to Image [set GEMINI_API_KEY]
Closed-model quality, one API key, no Comfy account
- images
Want Nano Banana inside a ComfyUI workflow without creating a Comfy account or buying Comfy credits? This is the node for that. It's a text-to-image wrapper around Google's gemini-3.1-flash-image-preview (the model behind Nano Banana 2), and it runs entirely on Google's servers - you just need a GEMINI_API_KEY and an internet connection. Zero VRAM, zero model downloads, and your local GPU can stay completely asleep.
That's the whole pitch, and honestly it's a good one. Nano Banana is closed; there's no open-weights version of it anywhere, so any local-only workflow simply can't produce what this can. The KB's own framing nails the trade: an API node is the right tool for a model you cannot run locally. That's this node exactly.
How it works
The node builds a generateContent request to the Gemini API ({base_url}/{model}:generateContent?key=...). Your prompt goes in as user content, the system_prompt field becomes a systemInstruction, and aspect_ratio, resolution, and response_modalities get packed into generationConfig.imageConfig. The response comes back, gets decoded, and lands in your graph as a standard IMAGE tensor - as far as the rest of your workflow is concerned, some generator node just ran.
The inputs that matter
- prompt - the whole job. Multiline, so take a paragraph if you want.
- system_prompt - defaults to "Generate high-quality images that follow the user's prompt closely." This is your consistency lever: bake style direction in here and keep the prompt field for content.
- resolution - 1K, 2K, or 4K. 4K native output is genuinely the differentiator here (the Pro/3 generation's flagship feature); just remember each step up costs more per call.
The rest: aspect_ratio (auto plus the standard set from 1:1 to 21:9, default 1:1), response_modalities (IMAGE, or IMAGE+TEXT if you want the model's reasoning text alongside - you still only get the image out of the node), seed (accepted upstream, but the README is honest that Gemini generation isn't guaranteed deterministic even with a seed), and base_url (defaults to Google's endpoint; point it at a reseller or proxy if you're routing around regional/billing friction).
Output is one images (IMAGE) tensor. Wire it to Save Image, or push it into a local upscaler - a common pattern, since this is a fast-draft model and 1K at a small size benefits from an upscale pass.
Installing it
It lives in the comfyui_jas_nodes pack with five siblings. ComfyUI Manager: search "comfyui_jas_nodes" and install. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/reducm/comfyui_jas_nodes
cd comfyui_jas_nodes
python -m pip install -r requirements.txt # only dependency is `requests`
Then set the key in the environment ComfyUI launches from and restart:
export GEMINI_API_KEY="your-key" # GOOGLE_API_KEY works too
No checkpoints, no safetensors, nothing to download. Set key, restart, search "JAS" in the node menu.
Common issues
Ninety percent of "it's broken" reports for this pack are the key never making it into ComfyUI's environment - the node fails immediately with GEMINI_API_KEY is not set. Set it in the shell that starts ComfyUI and fully restart. After that, provider errors are surfaced as raw HTTP status plus body, so a 4xx from Google will generally tell you what it didn't like.
Two things to keep in your head before you blame the node: your prompt and any input leave your machine and go to Google, whose image-safety filter applies (the node can't override what the model refuses); and every image carries Google's invisible SynthID watermark. If either of those is a dealbreaker, this isn't the node for you - but if you just want Nano Banana quality in a workflow, it's the least-friction way to get it.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| base_url | STRING | https://generativelanguage.googleapis.com/v1beta/models | — |
| model | COMBO | gemini-3.1-flash-image-preview | 1 options: gemini-3.1-flash-image-preview |
| aspect_ratio | COMBO | 1:1 | 11 options: auto, 1:1, 2:3, 3:2, 3:4, 4:3, +5 |
| resolution | COMBO | 1K | 3 options: 1K, 2K, 4K |
| response_modalities | COMBO | IMAGE | 2 options: IMAGE, IMAGE+TEXT |
| seed | INT | 00–2147483647 | — |
| system_prompt | STRING | Generate high-quality images that follow the user's prompt closely. | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |