OpenAI ChatGPT
A real LLM node that reads images and files
- images
- files
- advanced_options
- STRING
This is the centerpiece of the OpenAI text family: type a prompt, get a STRING back from a real GPT model, with optional images and files as context. It's one of ComfyUI's "partner nodes" - the built-in API nodes that bring cloud models into the graph. Where it shines is turning the node editor into an editing loop: draft a prompt, have GPT critique or expand it, feed the result into a text encoder. With images attached, it becomes a vision model that can caption a render, describe a reference, or tell you why your batch came out wrong.
The mechanism
The node calls OpenAI's Responses API through Comfy's proxy and polls until the answer is ready, then returns the text. Images get base64-embedded into the request; files come in pre-built from OpenAI Chat Input Files. Billing is through your Comfy account in credits - prepaid, per-token, with the approximate rate shown right on the node's price badge. No personal OpenAI key required, which is the whole point of the partner system: convenience storefront, not bring-your-own-credentials.
The inputs that matter
prompt- the text, multiline. Add detailed instructions here; it's the thing the model actually answers.model- the dropdown runs the gamut from gpt-5.6 and gpt-5 down to the cheap gpt-5-nano, plus the o1/o3/o4-mini reasoning line. Pick by the price badge, not vibes: nano is startlingly cheap for bulk work, o-series is for hard reasoning.images- optionalIMAGEcontext. For multiple images, the Batch Images node is the intended path.files- optional, from the Input Files node. Multiple files chain together there.advanced_options- optional, from OpenAI Chat Advanced Options.
One input to ignore: persist_context. The tooltip says it plainly - deprecated, has no effect. Legacy leftover; don't waste a thought on it.
Output is a single STRING, which wires into anything that takes text: a text display, a Text Encode node for prompt conditioning, a save node.
Getting it and the honest catches
It ships with ComfyUI core - the OpenAI partner nodes landed May 2025. Nothing to install.
The community's standing gripe, and it's fair: you can't plug in your own OpenAI key here, so it's Comfy's storefront and Comfy's pricing, with account login required and a small transaction fee on top. It's also not offline, obviously, and results are non-deterministic - run the same prompt twice and you'll get two answers. Where people get burned: attaching a big image or file stack silently inflates the token count (and the bill), and a low max_output_tokens in the config node turns into truncated answers. If the model seems to stop early or return nothing, that's the first thing to raise.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Text inputs to the model, used to generate a response. | |
| persist_context | BOOLEAN | false | This parameter is deprecated and has no effect. |
| model | COMBO | The model used to generate the response | |
| imagesopt | IMAGE | Optional image(s) to use as context for the model. To include multiple images, you can use the Batch Images node. | |
| filesopt | OPENAI_INPUT_FILES | Optional file(s) to use as context for the model. Accepts inputs from the OpenAI Chat Input Files node. | |
| advanced_optionsopt | OPENAI_CHAT_CONFIG | Optional configuration for the model. Accepts inputs from the OpenAI Chat Advanced Options node. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |