> ## 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.

# OpenAIChatNode - ComfyUI Built-in Node Documentation

> Complete documentation for the OpenAIChatNode node in ComfyUI. Learn its inputs, outputs, parameters and usage.

> 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)

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          | Data Type            | Required | Range                                                                                                                                                                                 | Description                                                                                                      |
| ------------------ | -------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `prompt`           | STRING               | Yes      | -                                                                                                                                                                                     | Text inputs to the model, used to generate a response (default: empty)                                           |
| `persist_context`  | BOOLEAN              | Yes      | -                                                                                                                                                                                     | This parameter is deprecated and has no effect (default: False)                                                  |
| `model`            | COMBO                | Yes      | `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` | The model used to generate the response (default: `gpt-5`)                                                       |
| `images`           | IMAGE                | No       | -                                                                                                                                                                                     | Optional image(s) to use as context for the model. To include multiple images, you can use the Batch Images node |
| `files`            | OPENAI\_INPUT\_FILES | No       | -                                                                                                                                                                                     | Optional file(s) to use as context for the model. Accepts inputs from the OpenAI Chat Input Files node           |
| `advanced_options` | OPENAI\_CHAT\_CONFIG | No       | -                                                                                                                                                                                     | Optional configuration for the model. Accepts inputs from the OpenAI Chat Advanced Options node                  |

## Outputs

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

***

**Source fingerprint (SHA-256):** `9adc9685d7fc31fba95bf43fa9e041289b6dbb9ab8f5ed30dc85e0acc015fe5c`
