GPT img API ChatGPT LLM
A ChatGPT text node that fits right into your workflow — you'll use it more than you think
- text
- raw_response_json
You probably found this pack for the image generation, but the LLM node is quietly the more useful one. GPT img API ChatGPT LLM sends a prompt to a ChatGPT model and returns the text reply as a plain STRING - which means you can use it the way ComfyUI users use any text node: chain it into a prompt encoder, have it rewrite a negative prompt, generate a caption, or summarize what the previous node decided. Anywhere you'd stick a hand-typed string, this can feed a live model instead.
The trade-off is the API key again: every call is billed to your OpenAI account. There's no local model, no GGUF to download, no VRAM - the whole exchange happens at api.openai.com. If you'd rather use your ChatGPT subscription, the OAuth twin (GPT img OAuth ChatGPT LLM) is the same node with login-based auth.
How it works
It POSTs to the Responses API (/v1/responses) with your system_prompt as a developer message and your prompt as the user message. The payload sets reasoning to your chosen reasoning_effort and caps the reply with max_output_tokens. The response comes back as JSON, and the node extracts the text while also keeping the whole raw payload for you.
The inputs that matter
prompt- the actual request. This is the one you'll edit constantly.system_prompt- role instructions; "You are a helpful assistant" is the default, and it's fine to leave it for casual use.model- defaults togpt-5.5, and this node also exposesgpt-5.5-profor heavier reasoning.reasoning_effort-minimalthroughxhigh. Medium is default; crank it for hard questions, drop it when you just want speed.max_output_tokens- output budget, default 2048, up to 128000.api_key- empty means it falls back toOPENAI_API_KEYin your environment.
Two optional sockets, system_prompt_input and user_prompt_input, override the widgets when connected - handy when you're feeding this node from another node's output instead of typing.
Outputs
text- the model's answer, a STRING you can wire into anything.raw_response_json- the full response object as a string, for when you need to inspect tokens or metadata.
Install
Manager may not show this pack yet (its registry version is still Pending), so clone manually:
cd ComfyUI/custom_nodes
git clone https://github.com/hub2vu/Comfyui-GPT-img-node.git GPT-img
Restart ComfyUI, find the "GPT img" category. Zero Python dependencies to install.
Common issues
The usual suspects: a missing or invalid api_key, and long generations hitting the timeout_sec default of 300 seconds. The model list here is broader than the image nodes because pro models can have different streaming support, so if a call fails oddly, check you're not picking a model the image nodes wouldn't offer. And as always with API-key nodes - don't commit the key into a workflow file that ends up in git.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| system_prompt | STRING | You are a helpful assistant. | — |
| prompt | STRING | Write a short answer. | — |
| api_key | STRING | — | |
| model | COMBO | gpt-5.5 | 5 options: gpt-5.5-pro, gpt-5.5, gpt-5, gpt-5.4, gpt-5.4-mini |
| reasoning_effort | COMBO | medium | 5 options: minimal, low, medium, high, xhigh |
| max_output_tokens | INT | 204816–128000 | — |
| timeout_sec | INT | 30030–3600 | — |
| system_prompt_inputopt | STRING | — | |
| user_prompt_inputopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| raw_response_json | STRING | — |