PVL Google NanoBanana API
Nano Banana straight from Google — with a fal.ai parachute
- images
- text
- images
Nano Banana is Google's own name for Gemini-native image generation - the rebrand of Gemini 2.5 Flash Image, so-called because the codename on a HuggingFace leaderboard stuck and Google leaned into it. You can't run it locally; the weights are closed and always have been. This node is the honest interface: it calls Google's API directly with gemini-2.5-flash-image-preview as the default model, and generates images from a text prompt (or edits them, if you connect images).
The bit that makes this node interesting rather than just a wrapper: use_fal_fallback defaults to on. When Google fails - rate limit, safety block, quota - the request routes to fal.ai's hosted Nano Banana instead (fal-ai/nano-banana for txt2img, fal-ai/nano-banana/edit for img2img), so your batch keeps producing. There's even a force_fal switch if you want to skip Google entirely. Two ways to reach the same closed model, and the node picks for you.
How it works
The node runs your prompt through Google's image model; with capture_text_output on, it also returns the model's text response as the text output. If force_fal is set, or a Google call fails and use_fal_fallback is on, it retries against fal with the routes in fal_route_txt2img / fal_route_img2img. A prompt written with [++] delimiters becomes multiple parallel generations - the delimiter splits your prompt into several calls whose results join back together, which is the pack's signature trick applied to image generation.
The inputs that matter
prompt- text-to-image instruction; the default is a tiny banana spaceship over a neon city, which tells you exactly what the author was testing with.images(optional) - connect one and it becomes an edit (img2img) rather than a generation.model- defaultgemini-2.5-flash-image-preview; type another model id to override.num_images- 1 to 12 per run.aspect_ratio- free-text, default1:1; the code validates against a set that includes 21:9, 16:9, 4:3, 3:2, 2:3, 5:4, 4:5, 3:4, 9:16.use_fal_fallback,force_fal,fal_api_key,fal_route_txt2img,fal_route_img2img- the resilience block. Setfal_api_keyor exportFAL_KEYfor fallback to work.api_key- blank usesGEMINI_API_KEYfrom the environment.capture_text_output- returns the model's text alongside images.seed,output_format(png/jpeg),retries,timeout_sec,debug_log,sync_mode,delimiter,endpoint_override,request_id.
Outputs: text (STRING) and images (IMAGE).
Installing it
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/pvlprk/comfyui-pvl-api-nodes
Restart, export GEMINI_API_KEY and (for the fallback) FAL_KEY, or fill the fields. No model downloads - this whole node is API calls.
Common issues
The biggest reality check is the censorship. Nano Banana is heavily filtered - the community shorthand is "powerful but unimaginative," and a January 2026 policy tightening only made the image-safety filtering stricter. Prompts that sail through local models will come back blocked or sanitized, and a Google safety block is exactly the case the fal fallback was built to catch. Second, the fallback needs its own key: if use_fal_fallback is on but FAL_KEY is unset, the fallback can't engage. Third, watch the text output: it's empty unless capture_text_output is on, so don't wire text expecting a caption by default. And remember both legs bill you - Google and fal are separate accounts, and the fallback doesn't quietly eat the cost.
Inputs (21)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | A tiny banana spaceship over a neon city. | — |
| seed | INT | 00–18446744073709550000 | — |
| model | STRING | gemini-2.5-flash-image-preview | — |
| output_format | COMBO | png | 2 options: png, jpeg |
| num_images | INT | 11–12 | — |
| retries | INT | 31–10 | — |
| timeout_sec | INT | 1205–600 | — |
| debug_log | BOOLEAN | false | — |
| capture_text_output | BOOLEAN | false | — |
| use_fal_fallback | BOOLEAN | true | — |
| force_fal | BOOLEAN | false | — |
| delimiter | STRING | [++] | — |
| sync_mode | BOOLEAN | false | — |
| imagesopt | IMAGE | — | |
| aspect_ratioopt | STRING | 1:1 | — |
| endpoint_overrideopt | STRING | — | |
| api_keyopt | STRING | — | |
| request_idopt | STRING | — | |
| fal_api_keyopt | STRING | — | |
| fal_route_img2imgopt | STRING | fal-ai/nano-banana/edit | — |
| fal_route_txt2imgopt | STRING | fal-ai/nano-banana | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| images | IMAGE | — |