> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenAI ChatGPT - ComfyUI Built-in Node Documentation

> This node generates text responses with OpenAI's GPT models.

This node generates text responses with OpenAI's GPT models. It sends a text prompt, and optionally images or files as context, and returns the answer as a string. Every setting lives inside the `model` selector: picking a model shows that model's own `reasoning_effort` levels, token limit, seed and system prompt, so no separate configuration node is needed. This node replaces the earlier OpenAI ChatGPT node, which the source code now marks as deprecated.

## Inputs

| Parameter | Description | Data Type | Required | Range |
| - | - | - | - | - |
| `model` | The model used to generate the response. Each model exposes the `reasoning_effort` levels it supports (default: `"gpt-6.2-sol"`). | DYNAMIC\_COMBO | Yes | `"gpt-6.2-sol"` `"gpt-6.2-astra"` `"gpt-6-astra"` `"gpt-6.1-sol"` `"gpt-6.1-terra"` `"gpt-6-sol"` `"gpt-6-luna"` `"gpt-5.6-sol"` `"gpt-5.6-terra"` `"gpt-5.6-luna"` `"gpt-5.5-pro"` `"gpt-5.5"` |
| `prompt` | Text input to the model (default: empty string). | STRING | Yes | - |
| `images` | Growable slot: connect 1..16 items (`image_1`, `image_2`, ...). Optional image(s) used as context for the model. | IMAGE | No | 0 to 16 images |
| `files` | Optional file(s) used as context for the model. Accepts inputs from the OpenAI ChatGPT Input Files node. | OPENAI\_INPUT\_FILES | No | - |
| `reasoning_effort` | How much the model reasons before answering. Higher levels use more tokens and take longer. The levels offered depend on the selected model (default: `"medium"`, `"high"` for `gpt-5.5-pro`). | COMBO | Yes | See the per-model list below |
| `max_output_tokens` | Maximum tokens to generate, including reasoning tokens. A low value together with a high `reasoning_effort` can leave no room for the answer (default: 32768). | INT | Yes | 16 to 128000 |
| `seed` | Seed controls whether the node should re-run; results are non-deterministic regardless of seed (default: 42). | INT | Yes | 0 to 2147483647 |
| `system_prompt` | Foundational instructions that dictate the model's behavior (default: empty string). | STRING | No | - |

### Reasoning effort levels per model

* `gpt-6.2-sol`, `gpt-6.2-astra`, `gpt-6-astra`, `gpt-6.1-sol`: `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"`, default `"medium"`.
* `gpt-6.1-terra`, `gpt-6-sol`, `gpt-6-luna`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`: `"none"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"`, default `"medium"`.
* `gpt-5.5-pro`: `"medium"`, `"high"`, `"xhigh"`, default `"high"`.
* `gpt-5.5`: `"none"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, default `"medium"`.

### Notes on behavior

* Only the answer text is returned. Messages the model emits in its commentary phase while thinking are skipped.
* If the token budget runs out before the answer is written, the node raises an error telling you to increase `max_output_tokens`.
* Images are sent at their own resolution with the API's automatic detail level, so large images use more tokens.
* Every request is stored on OpenAI's side, and the returned text joins the answer parts with newlines.

## Outputs

| Output Name | Description | Data Type |
| - | - | - |
| `output` | The text response generated by the OpenAI model. | STRING |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/OpenAIChatNodeV2/en.md)

***

**Source fingerprint (SHA-256):** `129c13a6c7b76d142c0a23234ab5e707a1dd39a99055974277d46a39593aa7ba`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.