NIX_ImageInference
Ask an OpenAI vision model what's in your image, then pipe the answer straight into your prompt
- image
- prompt_word
NIX_ImageInference is the "tell me what this image is" node. It takes your generated image, sends it to an OpenAI vision model, and returns the model's answer as a plain text string you can feed anywhere - into a prompt, a filename, a comparison. If you've ever wanted a reverse-prompt loop ("look at what I just made, describe it, then I'll nudge the prompt and try again"), this is the node that closes the loop.
One honest caveat before you get excited: it's the only node in the NIX pack that needs the openai Python library, and its default endpoint is a third-party proxy, not OpenAI's official API. More on that below, because it's the thing most likely to confuse you.
How it works
Give it an image, a model_name, a base_url, an api_key, and a user_prompt (multiline). The node takes the first image in the batch, encodes it as a base64 PNG, and calls OpenAI's Chat Completions API with your prompt plus the image as a vision input. Whatever the model says comes back as prompt_word (STRING). It's a one-shot call - there's no retry, no batching, no image out.
The default model_name is o3-2025-04-16. Change it to whatever your endpoint supports; if you're using a different provider that speaks the OpenAI API format (most do these days), the node doesn't care.
The default proxy thing
Here's the trap, and it's straight from the README: the default base_url is https://api.openai-proxy.org/v1, a third-party proxy, not https://api.openai.com/v1. The README itself recommends switching to the official endpoint for stability and compliance, and says the proxy may fail. Treat the proxy default as "the author's convenience," not a recommendation. If you're sending real images anywhere, you should also think about where they're going - this node ships your pixels to whatever endpoint you set. For work you can't send to a cloud API, local captioners (Florence2, Joy Caption) are the private alternative.
Also note there's no signal on this proxy in the community corpus - nobody's talking about it, good or bad - so you're relying on the author's word that it works. Set your own base_url and api_key and test.
The few inputs that matter
- api_key - required. Empty key means a failed call, and the node returns the error as the output string rather than crashing, which is nice but easy to miss.
- user_prompt - this is what the model is told to do with the image. "Describe this image in one sentence" is a reasonable start; "output a comma-separated tag list" works great if you're feeding tags back into a positive prompt.
- image - remember, only the first image of a batch is used. Feed one at a time.
The output prompt_word is just text, so wire it into a text concat, a CLIP text encode, or a save node's filename. It doesn't show up anywhere automatically.
Getting it installed
The pack ships all nodes together, but this one has an extra dependency:
cd ComfyUI/custom_nodes
git clone https://github.com/J-ChenX/ComfyUI-NIX
cd ComfyUI-NIX
pip install -r requirements.txt # installs openai, numpy, Pillow
Or use ComfyUI Manager (search "NIX" / "NIX ComfyUI Plugin", or install by Git URL https://github.com/J-ChenX/ComfyUI-NIX) - Manager handles requirements for you. Restart after installing. If the node returns "未安装 openai 库" (roughly "openai not installed"), you've skipped the requirements step - run pip install "openai>=1.0.0" in your ComfyUI environment.
Gotchas worth knowing
- It's not a batch node. One image in, one text out. Feed a batch and you only get the first frame described.
- Network failures return a string, not an exception, so a workflow "succeeds" with an error message as the prompt_word. Check your output before you build a whole pipeline on it.
- Third-party proxy by default. Swap
base_urltohttps://api.openai.com/v1and set your real key before you trust results. - Zero community footprint. This pack has no meaningful Reddit presence as of mid-2026, so if the API call misbehaves, the error string it returns is your only breadcrumb - plus the
openailibrary's own docs.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model_name | STRING | o3-2025-04-16 | — |
| base_url | STRING | https://api.openai-proxy.org/v1 | — |
| api_key | STRING | — | |
| user_prompt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt_word | STRING | — |