Chat Image Bridge 2
The Gemini node that hides all the plumbing
- image_1
- image
If the pack's flagship ChatImageBridge node is the "bring your own endpoint" workhorse, this is the point-and-shoot one. CatAPIGeminiImage (display name "Chat Image Bridge 2") is hardwired to the catapi.catcard.uk Gemini relay, and the author has gone out of their way to make sure you barely think about it: the base URL is prefilled, the model is chosen for you by the resolution you pick, and the connection details hide behind a little "Connection Settings" button. You type a prompt, maybe drop in a couple of images, hit go.
It talks Gemini's native generateContent endpoint (/v1beta/models/{model}:generateContent), which is the same protocol the KB's closed-source-models.md describes for Nano Banana / Gemini 3 image generation - 4K output, up to 14 reference images, multi-language text. What this node adds is that you never see any of it.
What you actually set
The front panel is three fields and that's most of the job:
- Prompt - plain English. Reference any attached images by name: "use the person from Image 1 and the clothes from Image 2." The node labels them
Image 1,Image 2… in the request, in order. - Output Ratio - a dropdown with the ratios the server actually accepts (
Square · 1:1,Landscape · 16:9,Portrait · 9:16, etc.), plusAuto / Keep InputandCustom Ratio. - Resolution -
1K,2K, or4K. This does double duty: it picks the model (gemini-3.1-flash-image-1K/-2K/-4k) and sendsimageConfig.imageSize, so "4K" is a real image parameter, not just a word in your prompt.
api_key and base_url sit behind the connection button (the key field is password-masked). Everything else you can leave alone.
Image inputs start at Image 1; wire it up and a second appears automatically, up to 14. Leave the last one unconnected and it collapses again. No images connected means text-to-image; connect one and you're doing reference or edit generation. The single output is image, straight into a Save Image node.
The custom-ratio rabbit hole
This is where the node gets clever, and where you should read before you click. The server only accepts a fixed set of aspect ratios - 1:1, 16:9, 21:9, and a dozen more - and it rejects arbitrary values like 20:9. Stable mode handles that by snapping your custom ratio to the nearest legal one (20:9 becomes 21:9). There's also an Exact Custom Ratio (Experimental) toggle that skips the invalid parameter entirely: it appends an invisible "Canvas Guide" image defining your exact canvas, lets the model compose against it, then center-crops the result to the strict ratio. Worth knowing: experimental mode fires exactly one request with no automatic fallback, so you won't get a surprise second billed generation if the result is off.
Install
This ships in the Chat-Image-Bridge-Node pack, so installing it is installing all six nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/Marigold1122/Chat-Image-Bridge-Node.git ComfyUI-ChatImageBridge
pip install -r ComfyUI-ChatImageBridge/requirements.txt
Restart ComfyUI, then find it under api -> Chat Image Bridge -> Chat Image Bridge 2. ComfyUI Manager can do the same - search "Chat-Image-Bridge-Node". The only dependency is requests; no model files, nothing heavy.
Troubleshooting
- The node refuses to run without an
api_key- it's not hardcoded anywhere in the pack, by design. Your key never leaves your node UI; it goes in the request headers. - A "response did not contain image data" error usually means the relay returned something non-image (a moderation block, a plain-text refusal). The error shows a redacted preview.
- If a custom ratio throws, it's because it must look like
20:9- width and height separated by a colon, both positive. - One caveat: the author targets this at
catapi.catcard.uk. Point the base URL anywhere else and you're on your own, because everything else assumes that relay's exact behavior.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| output_ratio | COMBO | Auto / Keep Input | 16 options: Auto / Keep Input, Square · 1:1, Landscape · 16:9, Landscape · 21:9, Landscape · 4:3, Landscape · 3:2, +10 |
| custom_ratio | STRING | 20:9 | — |
| resolution | COMBO | 1K | 3 options: 1K, 2K, 4K |
| api_key | STRING | — | |
| base_url | STRING | https://catapi.catcard.uk | — |
| exact_custom_ratio | BOOLEAN | false | — |
| image_1opt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |