Overview
api_yi_nano_banana_node is a lightweight ComfyUI custom node contributed by community partner JerrIsTheBesta. It focuses on “drop-in simplicity + easy extension.” Just drop it into your custom_nodes directory, restart ComfyUI, and you can call APIYI’s Nano Banana Pro / Nano Banana 2 image generation directly in your workflow — a perfect starting point for learning and customization.
Project Info
- 🔗 Source:
github.com/JerrIsTheBesta/api_yi_nano_banana_node - 📜 License: MIT
- 👤 Author: JerrIsTheBesta
- ⭐ Contributed by a community partner — positioned as an example you can extend
Core Features
Two core nodes
APIYI Text to Image + APIYI Multi Image Edit — covers the two most common workflowsDual-model switching
Choose between
gemini-3-pro-image-preview (Nano Banana Pro) and gemini-3.1-flash-image-previewHigh-res output
Supports 2K / 4K output with automatic timeout tuning based on resolution
Rich aspect ratios
Built-in 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 5:4, 4:5 — 10 ratios total
Multi-image editing
Multi Image Edit accepts up to 5 reference images for blending / style transferLightweight & hackable
Pure Python with minimal deps (requests / Pillow / numpy). Clean structure, easy to customize
Supported APIYI Models
Node Details
APIYI Text to Image
Generates images from a text prompt — no input image required. Outputs: generated image + filename identifier.APIYI Multi Image Edit
Accepts up to 5 input images for blending, editing, or composition. Outputs: result image, filename, count of images actually used.Node Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
api_key | string | Yes | - | APIYI token — we recommend a dedicated key with usage cap |
prompt | string | Yes | - | Text prompt |
model | enum | Yes | gemini-3-pro-image-preview | Model (Pro / Flash) |
resolution | enum | No | 2K | Output resolution (2K / 4K, 4K auto-extends timeout) |
aspect_ratio | enum | No | 1:1 | 10 aspect ratios available |
images | IMAGE | No | - | Reference images for Multi Image Edit (up to 5) |
Installation
Step 2: Install Python deps
Deps are minimal — ComfyUI typically ships with torch. Install the rest if missing:
Step 3: Restart ComfyUI
After restart, search
APIYI in the node palette to find:APIYI Text to ImageAPIYI Multi Image Edit
Step 4: Configure APIYI key
- Visit the APIYI Console → Tokens, and create a dedicated key with a usage cap (security best practice)
- Paste the key into the node’s
api_keyfield - No endpoint setup needed — the node uses
https://api.apiyi.cominternally
Usage Examples
Example 1: Text to Image
Example 2: Multi-Image Blending
Extension Ideas
This project is positioned as an example and starting point — fork and extend as needed:Conversational editing
Maintain session context inside the node for iterative refinement
More reference images
Raise the limit to 14 images to match Nano Banana Pro’s full capacity
Seed control
Add a seed parameter for reproducible generations
Batch output
Emit batches of images into downstream ComfyUI nodes
FAQ
Installed the node but can't find it in the palette?
Installed the node but can't find it in the palette?
- Make sure the repo is inside
ComfyUI/custom_nodes/ - Fully restart ComfyUI (not just refresh the frontend)
- Check ComfyUI’s console for any Python import errors
Calls fail with 401 / 403?
Calls fail with 401 / 403?
Check:
api_keyis correct and not restricted to the wrong channel- The selected model is on the token’s whitelist
- Account balance is sufficient — see Balance seems enough but calls fail
4K resolution times out frequently?
4K resolution times out frequently?
The node auto-extends timeout for 4K, but if it still fails:
- Check network path to the API (see CDN image/video downloads are slow)
- Fall back to 2K or Flash during peak hours
Is the API key exposure safe?
Is the API key exposure safe?
The author explicitly recommends not using your master key — create a dedicated token with a usage cap in the APIYI console for this node, so any leak has limited blast radius.
How is this different from the other ComfyUI-Nano-Banana-apiyi node?
How is this different from the other ComfyUI-Nano-Banana-apiyi node?
- This node: lightweight example, 2 nodes only, minimal deps — ideal for onboarding and customization
- Full version: richer feature set (conversational editing, 14-image blending), built for production workflows
Related Resources
Nano Banana Pro API
Full API reference for Nano Banana Pro
Full ComfyUI Node
The full-featured Nano Banana ComfyUI node pack
Scenario Overview
Browse more APIYI scenarios
APIYI Console
Manage API keys and usage