Ino Openai Chat Completions
Chat with any OpenAI-compatible API from inside the graph — vLLM, RunPod, Modal included
- success
- response
- finish_reason
- error
- reasoning
- tool_calls
- prompt_tokens
- completion_tokens
- total_tokens
Want an LLM to write your prompts, judge your outputs, or decide the next step in a workflow - mid-graph? This is the node. InoOpenaiChatCompletions sends a chat completion request to any OpenAI-compatible endpoint and returns the response as a string you can wire straight into a text encoder or a switch. The "any compatible endpoint" part is the key feature: base_url defaults to OpenAI but you can point it at vLLM, RunPod, Modal, or any local server speaking the OpenAI protocol. That's rarer than it sounds, and it's what makes this node useful beyond "call ChatGPT."
It needs a real API key (pasted in openai_api_key or set as an env var), so it's not a local-generation node - but it fits a genuinely common pattern in this ecosystem: cloud GPU users already juggle RunPod and S3, and routing one string through an LLM for prompt work is trivial by comparison.
How it works
Required: enabled and user_prompt. Optional but worth knowing:
openai_api_key- if left empty, the node falls back to theOPENAI_TOKENenv var. Same forbase_url→OPENAI_URL, andmodel→OPENAI_MODEL.model- defaults togpt-5; set it to whatever your endpoint serves.system_prompt- the system role message.image_url- pass an image URL to make it a vision call.temperature,max_tokens,top_p- the usual sampling knobs.enable_thinking- the one with a tooltip: "Qwen3-style thinking phase toggle for vLLM. Ignored by OpenAI-only servers." So if your vLLM serves a Qwen3-style model with a thinking phase, this toggles it; on plain OpenAI it's a no-op.
Outputs are the useful tail: response (the reply text), finish_reason, error (empty on success), reasoning (if the model returns a reasoning trace), tool_calls (serialized, if any), plus prompt_tokens, completion_tokens, total_tokens for cost tracking - and success.
Installing it
Part of the 125+-node ComfyUI-InoNodes pack by nobandegani:
cd ComfyUI/custom_nodes
git clone https://github.com/nobandegani/comfyui_ino_nodes
cd comfyui_ino_nodes
pip install -r requirements.txt
Or search "ComfyUI Ino Nodes" in ComfyUI Manager and restart. The pack's openai dependency is what this node needs. V3 schema - keep ComfyUI current.
Common issues
Key handling trips most people: the node tries openai_api_key first, then OPENAI_TOKEN. If neither is set, you get an auth error in error. Don't commit real keys into shared workflow JSONs - env vars are the safer habit here. Also note the model string must be served by your endpoint: gpt-5 is only valid against OpenAI. If your vLLM server rejects the request, the error output will tell you - and that's the nice part, it fails soft with success: False rather than killing the run. Start with enable_thinking off if you're on OpenAI; the tooltip says it's ignored there, but testing costs you one token.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | BOOLEAN | true | — |
| user_prompt | STRING | — | |
| openai_api_keyopt | STRING | — | |
| base_urlopt | STRING | https://api.openai.com/v1 | — |
| modelopt | STRING | gpt-5 | — |
| system_promptopt | STRING | — | |
| image_urlopt | STRING | — | |
| temperatureopt | FLOAT | 0.70–2 | — |
| max_tokensopt | INT | 10241–128000 | — |
| top_popt | FLOAT | 1.000–1 | — |
| enable_thinkingopt | BOOLEAN | true | Qwen3-style thinking phase toggle for vLLM. Ignored by OpenAI-only servers. |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| success | BOOLEAN | — |
| response | STRING | — |
| finish_reason | STRING | — |
| error | STRING | — |
| reasoning | STRING | — |
| tool_calls | STRING | — |
| prompt_tokens | INT | — |
| completion_tokens | INT | — |
| total_tokens | INT | — |