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

# OpenAI

> Configure direct OpenAI API access in AI Gateway for GPT and o-series models, with optional gateway routing and custom headers.

## Overview

OpenAI is a leading provider of large language models (LLMs) such as GPT-5.4 and GPT-5. AI Gateway can be configured to use OpenAI models for various AI operations.

## Configuration

To use OpenAI, configure it in the Plugin settings page under the `AI Gateway` section:

| Field        | Description                                    | Example                                           |
| ------------ | ---------------------------------------------- | ------------------------------------------------- |
| **API Key**  | Your OpenAI API key                            | `your-openai-api-key`                             |
| **Base URL** | Optional, to point at a gateway                | `https://ai-gateway.example.com/openai`           |
| **Headers**  | Optional, e.g. for authentication with gateway | Key: `X-Custom-Header`<br />Value: `custom-value` |

Then set the default language model (or configure it per-plugin):

```
Language Model: openai|gpt-5.4
```

### Supported Models

* gpt-5.4 (recommended)
* gpt-5
* o1
* o1-mini
* o1-preview
* o3-mini
* o3
* o4-mini
