Nodes/ComfyUI-ChatProviderAPI/ChatProvider Google-AI Vision
ComfyUI Node

ChatProvider Google-AI Vision

Ask Gemini to read your ComfyUI image — via a third-party proxy

By andreyvagner74-art·Created 2 months ago·Updated 2 months ago· 0
ChatProvider Google-AI Vision
  • image
  • image_2
  • text
width0
height0
api_key
endpoint
model
system_preset
user_promptDescribe this image in detail and produce a clean prompt for image generation.
custom_system_prompt
temperature0.50
top_p1.00
max_tokens4096
retries1
assistant_prompt_enabledfalse
assistant_prompt

You've got an image on your ComfyUI canvas and you want a frontier vision model to tell you what's in it, or write the next prompt from it. ChatProvider Google-AI Vision is the node for that: it sends your IMAGE to Google Gemini through a third-party aggregator called chatprovider.org and returns the model's answer as a STRING you can feed straight back into the graph.

This is the "prompt enhancer and captioner" pattern, not a diffusion node. The job is entirely text - it reads an image, writes a caption or a generation prompt, and never touches a checkpoint or your VRAM. If you've used a local JoyCaption or Florence-2 chain for the same job, this is the API alternative: Gemini-quality prose instead of a small open model, per-call instead of per-GPU. Reach for it when you want large-chat quality and don't need it offline or uncensored.

What's actually happening under the hood

The name is a small lie worth knowing before you trust it: this node calls chatprovider.org, not Google directly. ChatProvider is an OpenAI-compatible aggregator/reseller - think a smaller OpenRouter - that proxies Gemini (and Claude, GLM, Kimi and friends) behind one API key. The node turns your image tensor into PNG bytes, base64-encodes them into an OpenAI-style image_url data URL, and POSTs it to https://chatprovider.org/proxy/google-ai/v1/chat/completions with your key in the Authorization header.

A few mechanism details that shape how you use it:

  • The model dropdown is loaded live from https://chatprovider.org/api/v1/models, filtered to google-ai/* and the gemini*/gemma* names, with embeddings and image-generation models filtered out. If that fetch fails, it falls back to a hardcoded list of common Gemini names - so don't panic if a model vanishes; the live list just didn't load.
  • Responses are streamed and re-aggregated into one text output, so you see the full answer rather than a token at a time.
  • The node never caches (IS_CHANGED returns the current time), so it re-calls the API every time you hit Queue. Budget your credits accordingly.
  • Every request logs to the ComfyUI console with the resolved system and user prompts - but image bytes and API keys are masked, which is better behavior than most of this category shows.

The inputs that matter

Most of the inputs you can ignore. The ones a beginner actually sets:

  • api_key - your chatprovider.org key. Or set the CHATPROVIDER_API_KEY environment variable and leave the field empty; the node checks the env var as a fallback.
  • model - defaults to google-ai/gemini-2.5-flash, and the live list gives you the full Gemini 2.5 and 3.x ladder. Flash is plenty for captioning; reach for pro only when you need extra reasoning.
  • user_prompt - the instruction, defaulting to "Describe this image in detail and produce a clean prompt for image generation." That default is the right shape for most workflows: describe, then rewrite as a generation prompt.
  • custom_system_prompt - optional system-level instructions. The system_preset dropdown is largely decorative in practice: the README mentions bundled presets, but the repo doesn't actually ship the presets file, so you'll mostly see just "None" and write your own.
  • width / height - canvas dimension overrides. Leave both at 0 and the node uses the input image's real size.
  • temperature - 0.5 is a sane starting point for deterministic captioning; drop toward 0 for strict tag-style output.

Optional image and image_2 inputs take the IMAGE tensors. Wire image from any sampler or VAE decode output; image_2 lets you compare two references (say, a character and a background) in one call. The text output is a STRING - plug it into a text encoder if you're reusing the result as a prompt, or into a Save-Text/Show-Text node to read it.

Installing it

ComfyUI Manager is the easy road: search ComfyUI-ChatProviderAPI, install, restart. Or do it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/andreyvagner74-art/ComfyUI-ChatProviderAPI

then restart ComfyUI. There's no requirements.txt and no model to download - the whole thing is one Python file using the standard library plus numpy and PIL, which ComfyUI already ships. That's refreshing for a node in this category. The one thing you must do is create an account at chatprovider.org and get a key; nothing works without it.

Troubleshooting

  • "Set ChatProvider API key in the node or CHATPROVIDER_API_KEY env var." - that's the node's own error, thrown when no key is present. Fill the field or export the variable before launching ComfyUI.
  • The model list looks stale or empty - the live fetch failed and you're on the fallback list. Confirm your network can reach chatprovider.org/api/v1/models; the node prints a Could not load models warning to the console.
  • Empty response - the node builds a diagnostic message quoting the upstream status and warns in the console. Check that log for the resolved prompt and any rate-limit signal; the retries input (default 1) handles transient failures.

One honest caution from the KB, because this node is exactly its shape: an API-wrapper node that holds a key and phones home by design is the one category that's already been weaponized in ComfyUI (the ComfyUI_LLMVISION malware incident). This pack is small, new, and community-invisible - chatprovider.org has zero footprint in the r/comfyui corpus. The code itself is clean, readable, and masks your key in its logs, which is reassuring. But you're still sending every image you process through a third-party proxy, so use it for things you're comfortable leaving the machine, and glance at nodes.py before you wire it into anything sensitive.

CategoryChatProviderAPI

Inputs (16)

NameTypeDefaultDescription
widthINT00–16384Prompt/canvas width override. 0 = use the input image width. Convert to input to connect externally.
heightINT00–16384Prompt/canvas height override. 0 = use the input image height. Convert to input to connect externally.
api_keySTRING
endpointCOMBO1 options: Google-AI direct: /google-ai/v1/chat/completions
modelCOMBO18 options: google-ai/gemini-2.5-flash, google-ai/gemini-2.5-flash-lite, google-ai/gemini-2.5-pro, google-ai/gemini-3-flash-preview, google-ai/gemini-3.1-flash-lite, google-ai/gemini-3.1-flash-lite-preview, +12
system_presetCOMBO1 options: None
user_promptSTRINGDescribe this image in detail and produce a clean prompt for image generation.
custom_system_promptSTRING
temperatureFLOAT0.500–2
top_pFLOAT1.000–1
max_tokensINT40961–32000
retriesINT10–5
assistant_prompt_enabledBOOLEANfalse
assistant_promptSTRING
imageoptIMAGE
image_2optIMAGE

Outputs (1)

NameTypeDescription
textSTRING