Nodes/Leon's Utility and API Integration Nodes/πŸ€– Leon Nano Banana Tuzi API 🐰
ComfyUI Node

πŸ€– Leon Nano Banana Tuzi API 🐰

Nano Banana 2 text-to-image from inside ComfyUI β€” via the Tuzi API

By l3ony2kΒ·Created about a year agoΒ·Updated 2 months agoΒ· 3
πŸ€– Leon Nano Banana Tuzi API 🐰
  • input_images_array
  • image
  • image_url
  • seed
β—„prompta cat.β–Ί
β—„modelnano-banana-proβ–Ί
β—„seed0β–Ί
β—„api_keyYOUR_API_KEY_HEREβ–Ί
β—„response_formaturlβ–Ί
β—„size1x1β–Ί
β—„quality2kβ–Ί

Leon Nano Banana Tuzi API 🐰 is the generation-side sibling of the pack's edit node: same Nano Banana 2 model family, same Tuzi backend, but this one makes images from a prompt instead of editing ones you hand it. Drop in a prompt, pick a model and a size, and a tensor comes back the other end. It's a clean way to get Google-grade closed-model generation into a ComfyUI graph without renting a GPU or running a 12B transformer locally.

"Nano Banana" is Google's Gemini-native image generation - the Pro line is the flagship (native 4K output, strong text rendering), and nano-banana-2 is the speed-and-quality hybrid. The Tuzi part is the provider: api.tu-zi.com. That's worth repeating because it's the #1 gotcha of this node: it uses a Tuzi API key, not the HyprLab key the rest of the pack defaults to. The api_key input literally defaults to YOUR_API_KEY_HERE and the tooltip says "Your Tuzi API key". Sign up at the provider, paste the key, done.

How it works

The node builds a JSON payload - model, prompt, response_format, optional size and quality - and POSTs it to https://api.tu-zi.com/v1/images/generations with a Bearer token. It reuses the pack's shared HyprLab-style base class, which means the same 5-attempt exponential-backoff retry and the same post-processing: the returned image gets converted to an RGBA tensor, so it plugs straight into PreviewImage, SaveImage, or anything else downstream that expects an IMAGE.

Inputs worth knowing:

  • prompt - max 1000 characters. Default is "a cat.", which is the pack's way of telling you to write something real.
  • model - nano-banana-pro, nano-banana-pro-2k, nano-banana-pro-vip, or nano-banana-2.
  • size - WxH ratio choices from 1x1 up to 21x9.
  • quality - 1k / 2k / 4k, but the tooltip is explicit: only effective for Banana 2. On Pro models it's ignored.
  • input_images_array - optional, up to 4 images, which turns this from text-to-image into image-to-image. Wire it through the pack's Image Array Builder node; that's the only source of the IMAGE_ARRAY type.

Outputs are the pack standard triple: image (RGBA tensor), image_url (hosted URL, or a data URI if you chose b64_json for response_format), and seed.

Installing it

Same pack install as always:

cd ComfyUI/custom_nodes
git clone https://github.com/l3ony2k/comfyui-leon-nodes
pip install -r requirements.txt

Restart ComfyUI, or use ComfyUI Manager and search for the Leon pack. Dependencies are just tenacity, requests, pillow, torch and numpy - no models to download, because the heavy lifting happens on Tuzi's servers.

Where people get burned

Beyond the key mixup, the thing that bites people is expecting seed to be a hard guarantee of reproducibility. It works for these Nano Banana models - the seed is sent through and returned - but the retry behavior means a transient failure re-runs with the same seed, which is fine. More practically: don't forget that quality is a no-op on Pro, and remember the array-based image input means the Image Array Builder is part of the standard wiring. If you want to edit images rather than generate them, grab the edit variant of this node - it's the sibling in the same pack and the one with the multi-image remix workflow.

CategoryLeon_API

Inputs (8)

NameTypeDefaultDescription
promptSTRINGa cat.Text description of the desired image. Maximum length 1000 characters.
modelCOMBOnano-banana-proNano Banana 2 model variants
seedINT00–18446744073709550000Random seed for reproducible results
api_keySTRINGYOUR_API_KEY_HEREYour Tuzi API key
response_formatCOMBOurlFormat for returning the generated image. Must be either url or b64_json.
input_images_arrayoptIMAGE_ARRAYArray of input images (up to 4). Connect Image Array Builder node output here.
sizeoptCOMBO1x1Size of generated image (format: WxH ratio)
qualityoptCOMBO2kImage generation quality (only effective for Banana 2)

Outputs (3)

NameTypeDescription
imageIMAGEβ€”
image_urlSTRINGβ€”
seedINTβ€”