OpenAI LLM
The capable brain for hard thinking in workflows
- image
- response
If the Groq LLM node is the speed pick, this is the smart pick. The OpenAI LLM node exposes OpenAI's current chat/reasoning lineup - gpt-5.x, the gpt-4.1 pair, o1, o3-mini - as a ComfyUI text node, with an optional image input for vision work. When your workflow needs the best possible answer rather than the fastest one, this is where you go.
Realistically, you reach for this when the local/cheap options come up short: complicated prompt engineering ("rewrite this scene description as a professional cinematic shot list"), hard captioning, anything where reasoning_effort: high is doing real work. It's also the pack's most direct route to OpenAI's newer reasoning models from inside a graph.
How it works
The node uses OpenAI's Responses API (client.responses.create()) with your prompt, model, and settings. reasoning_effort is passed through to the models that support it. The optional image input is attached to the request for vision-capable models, letting you query a reference image. The completion comes back as plain text into the response output.
The inputs that matter
- prompt - the instruction.
- model - eleven options: the
gpt-5.4/gpt-5.4-pro/gpt-5.2/gpt-5.2-pro/gpt-5/gpt-5-mini/gpt-5-nanoline,gpt-4.1/gpt-4.1-mini, and the reasoning pairo1/o3-mini. Pick by the job: mini/nano for cheap fast work, the pro tiers for the final answer, o-series if you specifically want the classic reasoning models. - temperature (default 1.0) - same story as the rest of the pack: hot by default. Drop it for stable rewrites.
- reasoning_effort -
low/medium/high. This is the dial that makes the node expensive but also makes it good. Use high sparingly. - max_output_tokens - default 16384, up to 32768. Plenty for any prompt-writing task.
- system_instruction (optional) - role-setting. Worth filling in for consistent output.
- image (optional) - attach a reference image for vision queries.
- api_key - OpenAI key in the field or
.env(OPENAI_API_KEY).
The output
response - a STRING, wired into any text input downstream (prompt encoders, other nodes' prompt fields, save-text).
Installing it
One of ~20 nodes in the Aryan185/ComfyUI-ExternalAPI-Helpers pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Aryan185/ComfyUI-ExternalAPI-Helpers.git
cd ComfyUI-ExternalAPI-Helpers
pip install -r requirements.txt
Restart ComfyUI; find "OpenAI LLM" under text/generation. Needs the openai package. OpenAI key with billing in the field, or OPENAI_API_KEY in .env (copy .env.example).
Where people get burned
Cost, mostly. reasoning_effort: high on a pro-tier model is real money per call, and it's easy to leave it on for every render. The temperature default of 1.0 also means drift on re-runs - for deterministic workflow output, set it lower. And not every model in the enum supports every feature equally: reasoning effort and image input behave differently across the gpt-5 and o-series lines, so if a model errors on an input you're feeding, that's often a model-capability thing, not a node bug. Match the model to what you're actually sending.
The pack-level answer still stands: Groq for speed and free tier, this node for when the answer has to be right.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| model | COMBO | 11 options: gpt-5.4, gpt-5.4-pro, gpt-4.1, gpt-4.1-mini, gpt-5, gpt-5.2, +5 | |
| temperature | FLOAT | 1.000–2 | — |
| reasoning_effort | COMBO | 3 options: low, medium, high | |
| api_key | STRING | Directly put OpenAI API key or .env variable name (OPENAI_API_KEY) | |
| max_output_tokens | INT | 163841–32768 | — |
| system_instructionopt | STRING | — | |
| imageopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| response | STRING | — |