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

# OpenAIChatNode - ComfyUI Built-in Node Documentation

> This node generates text responses from an OpenAI model.

This node generates text responses from an OpenAI model. It sends your text prompt, and optionally images or files, to an OpenAI model and returns the generated text response.

## Inputs

| Parameter          | Description                                                                                                       | Data Type            | Required | Range                                                                                                                                                                                                                                                                |
| ------------------ | ----------------------------------------------------------------------------------------------------------------- | -------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `prompt`           | Text inputs to the model, used to generate a response (default: empty string).                                    | STRING               | Yes      | -                                                                                                                                                                                                                                                                    |
| `persist_context`  | This parameter is deprecated and has no effect (default: False).                                                  | BOOLEAN              | Yes      | -                                                                                                                                                                                                                                                                    |
| `model`            | The model used to generate the response (default: `gpt-5`)                                                        | COMBO                | Yes      | `gpt-6-astra`<br />`gpt-5.6-sol`<br />`gpt-5.6-terra`<br />`gpt-5.6-luna`<br />`gpt-5.5-pro`<br />`gpt-5.5`<br />`gpt-5`<br />`gpt-5-mini`<br />`gpt-5-nano`<br />`gpt-4.1`<br />`gpt-4.1-mini`<br />`gpt-4.1-nano`<br />`o4-mini`<br />`o3`<br />`o1-pro`<br />`o1` |
| `images`           | Optional image(s) to use as context for the model. To include multiple images, you can use the Batch Images node. | IMAGE                | No       | -                                                                                                                                                                                                                                                                    |
| `files`            | Optional file(s) to use as context for the model. Accepts inputs from the OpenAI Chat Input Files node.           | OPENAI\_INPUT\_FILES | No       | -                                                                                                                                                                                                                                                                    |
| `advanced_options` | Optional configuration for the model. Accepts inputs from the OpenAI Chat Advanced Options node.                  | OPENAI\_CHAT\_CONFIG | No       | -                                                                                                                                                                                                                                                                    |

Note: When an `advanced_options` configuration that sets a reasoning effort is connected, the selected `model` must support that effort value. For example, the gpt-4.1 family of models does not support any reasoning effort, `gpt-5.5` supports none, low, medium, high and xhigh, and `gpt-5.5-pro` supports medium, high and xhigh. If the reasoning effort is not supported by the selected model, the node raises an error.

## Outputs

| Output Name   | Description                                      | Data Type |
| ------------- | ------------------------------------------------ | --------- |
| `output_text` | 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/OpenAIChatNode/en.md)

***

**Source fingerprint (SHA-256):** `687a6b1110518a2eaf23e240f43991b4ff91d6f01cae6c3ef55bcdac810e7a89`
