NIUNIU API-大香蕉🍌2
Gemini image gen on your ComfyUI canvas — no GPU, just an API key
- 参考图1
- 参考图2
- 参考图3
- 参考图4
- 参考图5
- 参考图6
- 参考图7
- 参考图8
- 参考图9
- 参考图10
- 参考图11
- 参考图12
- 参考图13
- 参考图14
- 图像
- 图片链接
- 任务ID
- 响应信息
The name is a lie, in the good way. "大香蕉" (big banana) is what Chinese ComfyUI users call Google's Nano Banana image model, and this node is a thin client for the Gemini image API family. It downloads no model, needs no GPU, and if you have a key it just works. The one thing it genuinely requires is an account somewhere that sells Gemini image access.
What it actually is
This is an API-wrapper node, not a generator node. You type a prompt, the node POSTs it to a server, and the server's image comes back and lands on your canvas as a normal IMAGE tensor - exactly as if a local sampler had made it. Under the hood that means three things the local crowd forgets until it bites: every call is metered (per image, and prices climb fast at 2K/4K), your prompt and any reference images leave your machine, and the content filter lives at Google, not here. If the prompt is something the model refuses, no node setting will unrefuse it. The KB frames it cleanly: API nodes are the right tool for a model you can't run locally, and the wrong default for one you can.
The default model field is gemini-3-pro-image-preview - that's Nano Banana Pro territory, Google's flagship image model with 4K native output and up to 14 reference images. This node hands it up to 14 reference inputs (参考图1–14), which is not a typo.
How it works
It's two HTTP calls dressed up as a ComfyUI node. In 文生图 (text-to-image) mode it posts to /v1/images/generations; in 图像编辑 (image-edit) mode it posts to /v1/images/edits with your reference images as PNG multipart files. The request is sent async, the node polls /v1/images/tasks/{id} until the job completes, then it either downloads the URL or decodes the base64 and converts it to a tensor.
The author was nice about sloppy endpoints: paste https://api.llyapps.com or a full /v1/images/generations URL and the node strips it down to the right base. Note the quiet cap in the code - if your model ID contains image-preview, a "2K" or "4K" resolution request gets clamped to a 1024px long side. Google's preview models don't go bigger, so pick 2K and don't expect 2K.
The inputs that matter
Most of the required fields are self-explanatory, and three are worth your attention:
- API密钥 / API地址 - the key from your provider; the address defaults to
https://api.llyapps.com, a "New API" style relay that also accepts other OpenAI-compatible endpoints. Change the key, keep the address, or swap both for any relay you already pay. - 生成模式 - 文生图 or 图像编辑. Edit mode requires at least one 参考图 wired in, or the node returns an error image.
- 出图数量 - 1 to 4 images per request. This is the cost lever; four at 2K adds up.
The rest - 宽高比 (11 presets from 21:9 to 9:16), 图片分辨率 (1K/2K/4K), 随机种子, 模型版本 - behave like you'd hope. 模型版本 is a free-text field, so you can paste any model name your relay lists, not just the default.
Outputs are 图像 (the IMAGE tensor - wire it to a preview or save node), 图片链接 (the source URL), 任务ID, and 响应信息 (a JSON blob with the full response; read this when something's off).
Installing it
Same as any pack in this family. Via ComfyUI Manager: search "ComfyUI-NIUNIUAPI", install, restart. Or the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/xiongmaowf/ComfyUI-NIUNIUAPI
# restart ComfyUI
Dependencies are requests, pillow, numpy (declared in pyproject.toml) - nothing heavy, no model files to download. It's a cloud node; the only "download" is your API key.
Troubleshooting
The node's error handling is... visual. A failed call returns a solid 512×512 placeholder: black means a missing key or address, red means the API rejected something (401 = bad key or wrong endpoint; a content block shows up as PROHIBITED_CONTENT in the 响应信息), yellow means your poll timed out, white means the response contained no usable image. You'll see these once and learn them.
A couple of honest gotchas: the 2K/4K cap above, and the security posture. This is a third-party node whose whole job is phoning home with a credential - the exact shape of the node that shipped malware once in this ecosystem (the LLMVISION incident). This pack is small and unremarkable, but read the source before you hand it your key if that's how you roll. And remember the data flow: reference images for editing are uploaded to the relay, not kept local.
Inputs (25)
| Name | Type | Default | Description |
|---|---|---|---|
| 🔑 API密钥 | STRING | 请输入您的 API Key | |
| 🌐 API地址 | STRING | https://api.llyapps.com | New API 服务地址(填域名/端口即可;如果你粘贴了 /v1 或 /v1/images/generations 也会自动纠正) |
| 📝 提示词 | STRING | 一个美女坐在深林里面,真实摄影 | 提示词 |
| 🎨 生成模式 | COMBO | 文生图 | 模式:文生图 或 图像编辑 |
| 🤖 模型版本 | STRING | gemini-3-pro-image-preview | 模型名称/ID(可直接粘贴 New API 面板里的模型名) |
| 📐 宽高比 | COMBO | auto | 宽高比 |
| 🖼️ 图片分辨率 | COMBO | 2K | 图片分辨率 |
| 🎲 随机种子 | INT | 00–2147483647 | 随机种子 |
| 🖼️ 出图数量 | INT | 11–4 | 一次请求生成图片数量 |
| 任务IDopt | STRING | 仅用于透传/记录;New API Image 接口一般为同步返回 | |
| 返回格式opt | COMBO | url | 返回格式:URL链接 或 Base64编码 |
| 参考图1opt | IMAGE | — | |
| 参考图2opt | IMAGE | — | |
| 参考图3opt | IMAGE | — | |
| 参考图4opt | IMAGE | — | |
| 参考图5opt | IMAGE | — | |
| 参考图6opt | IMAGE | — | |
| 参考图7opt | IMAGE | — | |
| 参考图8opt | IMAGE | — | |
| 参考图9opt | IMAGE | — | |
| 参考图10opt | IMAGE | — | |
| 参考图11opt | IMAGE | — | |
| 参考图12opt | IMAGE | — | |
| 参考图13opt | IMAGE | — | |
| 参考图14opt | IMAGE | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| 图像 | IMAGE | — |
| 图片链接 | STRING | — |
| 任务ID | STRING | — |
| 响应信息 | STRING | — |