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

# OpenAI

> The industry-standard LLM provider offering the GPT-5.x family (including GPT-5.5 Instant and GPT-5.5 Pro), the o-series reasoning models, prior GPT-4.x snapshots, embeddings, DALL-E image generation, and Whisper audio transcription.

OpenAI offers 67 models through Lava's AI Gateway, supporting Chat Completions, Embeddings, Text to Speech, Transcription, Image Generation. Authentication uses `Authorization: Bearer`. See the [OpenAI API docs](https://platform.openai.com/docs/api-reference) for provider-specific parameters.

<Info>Supports both **managed** (Lava's API keys) and **unmanaged** (bring your own credentials) mode.</Info>

## Quick Start

```typescript theme={null}
const response = await fetch('https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${forwardToken}`,
  },
  body: JSON.stringify({
    model: 'gpt-5.5',
    messages: [{ role: "user", content: "Hello!" }],
  }),
});
```

## Chat Completions

**Target URL:** `https://api.openai.com/v1/chat/completions`

|                  |                                          |
| ---------------- | ---------------------------------------- |
| **Content Type** | `application/json`                       |
| **Streaming**    | Yes (set `stream: true` in request body) |

| Model                   | Input / 1M tokens | Output / 1M tokens |
| ----------------------- | ----------------- | ------------------ |
| o1-pro                  | \$150.00          | \$600.00           |
| o1-pro-2025-03-19       | \$150.00          | \$600.00           |
| gpt-5.5-pro             | \$30.00           | \$180.00           |
| gpt-5.5-pro-2026-04-23  | \$30.00           | \$180.00           |
| gpt-5.4-pro             | \$30.00           | \$180.00           |
| gpt-4                   | \$30.00           | \$60.00            |
| gpt-4-0613              | \$30.00           | \$60.00            |
| gpt-5.2-pro             | \$21.00           | \$168.00           |
| o3-pro                  | \$20.00           | \$80.00            |
| o3-pro-2025-06-10       | \$20.00           | \$80.00            |
| gpt-5-pro               | \$15.00           | \$120.00           |
| o1                      | \$15.00           | \$60.00            |
| o1-2024-12-17           | \$15.00           | \$60.00            |
| gpt-4-turbo             | \$10.00           | \$30.00            |
| gpt-4-turbo-2024-04-09  | \$10.00           | \$30.00            |
| gpt-5.5                 | \$5.00            | \$30.00            |
| gpt-5.5-2026-04-23      | \$5.00            | \$30.00            |
| gpt-5.5-chat-latest     | \$5.00            | \$30.00            |
| gpt-4o-2024-05-13       | \$5.00            | \$15.00            |
| gpt-5.4                 | \$2.50            | \$15.00            |
| gpt-5.4-codex           | \$2.50            | \$15.00            |
| gpt-4o                  | \$2.50            | \$10.00            |
| gpt-4o-2024-11-20       | \$2.50            | \$10.00            |
| gpt-4o-2024-08-06       | \$2.50            | \$10.00            |
| gpt-4.1                 | \$2.00            | \$8.00             |
| gpt-4.1-2025-04-14      | \$2.00            | \$8.00             |
| o3                      | \$2.00            | \$8.00             |
| o3-2025-04-16           | \$2.00            | \$8.00             |
| davinci-002             | \$2.00            | \$2.00             |
| gpt-5.3-chat-latest     | \$1.75            | \$14.00            |
| gpt-5.3-codex           | \$1.75            | \$14.00            |
| gpt-5.2                 | \$1.75            | \$14.00            |
| gpt-5.2-chat-latest     | \$1.75            | \$14.00            |
| gpt-3.5-turbo-instruct  | \$1.50            | \$2.00             |
| gpt-5.1                 | \$1.25            | \$10.00            |
| gpt-5                   | \$1.25            | \$10.00            |
| gpt-5-2025-08-07        | \$1.25            | \$10.00            |
| gpt-5-search-api        | \$1.25            | \$10.00            |
| o4-mini                 | \$1.10            | \$4.40             |
| o4-mini-2025-04-16      | \$1.10            | \$4.40             |
| o3-mini                 | \$1.10            | \$4.40             |
| o3-mini-2025-01-31      | \$1.10            | \$4.40             |
| gpt-3.5-turbo-1106      | \$1.00            | \$2.00             |
| gpt-5.4-mini            | \$0.75            | \$4.50             |
| gpt-3.5-turbo           | \$0.50            | \$1.50             |
| gpt-3.5-turbo-0125      | \$0.50            | \$1.50             |
| gpt-4.1-mini            | \$0.40            | \$1.60             |
| gpt-4.1-mini-2025-04-14 | \$0.40            | \$1.60             |
| babbage-002             | \$0.40            | \$0.40             |
| gpt-5-mini              | \$0.25            | \$2.00             |
| gpt-5-mini-2025-08-07   | \$0.25            | \$2.00             |
| gpt-5.4-nano            | \$0.20            | \$1.25             |
| gpt-4o-mini             | \$0.15            | \$0.60             |
| gpt-4o-mini-2024-07-18  | \$0.15            | \$0.60             |
| gpt-4.1-nano            | \$0.10            | \$0.40             |
| gpt-4.1-nano-2025-04-14 | \$0.10            | \$0.40             |
| gpt-5-nano              | \$0.05            | \$0.40             |
| gpt-5-nano-2025-08-07   | \$0.05            | \$0.40             |

## Embeddings

**Target URL:** `https://api.openai.com/v1/embeddings`

|                  |                    |
| ---------------- | ------------------ |
| **Content Type** | `application/json` |
| **Streaming**    | No                 |

| Model                  | Input / 1M tokens | Output / 1M tokens |
| ---------------------- | ----------------- | ------------------ |
| text-embedding-3-large | \$0.13            | Free               |
| text-embedding-ada-002 | \$0.10            | Free               |
| text-embedding-3-small | \$0.02            | Free               |

## Text to Speech

**Target URL:** `https://api.openai.com/v1/audio/speech`

|                  |                    |
| ---------------- | ------------------ |
| **Content Type** | `application/json` |
| **Streaming**    | No                 |

| Model    | Input / 1M chars | Output / 1M chars |
| -------- | ---------------- | ----------------- |
| tts-1-hd | \$30.00          | Free              |
| tts-1    | \$15.00          | Free              |

## Transcription

**Target URL:** `https://api.openai.com/v1/audio/transcriptions`

|                  |                       |
| ---------------- | --------------------- |
| **Content Type** | `multipart/form-data` |
| **Streaming**    | No                    |

| Model     | Input / minute | Output / minute |
| --------- | -------------- | --------------- |
| whisper-1 | \$0.006        | Free            |

## Image Generation

**Target URL:** `https://api.openai.com/v1/images/generations`

|                  |                    |
| ---------------- | ------------------ |
| **Content Type** | `application/json` |
| **Streaming**    | No                 |

| Model                  | Input / 1M tokens | Output / 1M tokens |
| ---------------------- | ----------------- | ------------------ |
| gpt-image-2            | \$5.00            | Free               |
| gpt-image-2-2026-04-21 | \$5.00            | Free               |
| gpt-image-1            | \$5.00            | Free               |

## Next Steps

<CardGroup cols={2}>
  <Card title="All Providers" icon="grid" href="/gateway/supported-providers">
    Browse all supported AI providers
  </Card>

  <Card title="Forward Proxy" icon="route" href="/gateway/forward-proxy">
    Learn how to construct proxy URLs and authenticate requests
  </Card>
</CardGroup>
