> ## 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-6 family (Astra, Sol, Terra, and Luna), the o-series reasoning models, prior GPT-4.x snapshots, embeddings, GPT Image generation, and Whisper audio transcription.

OpenAI offers 51 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.

> [!NOTE]
>
> Supports both **managed** (Lava's API keys) and **unmanaged** (bring your own credentials) mode.

## 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-6-astra',
    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 |
| - | - | - |
| 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-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 |
| gpt-6-astra | \$10.00 | \$50.00 |
| gpt-5.5 | \$5.00 | \$30.00 |
| gpt-5.5-2026-04-23 | \$5.00 | \$30.00 |
| gpt-5.6 | \$4.00 | \$20.00 |
| gpt-5.6-sol | \$4.00 | \$20.00 |
| gpt-5.4 | \$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-6.1-sol | \$2.00 | \$10.00 |
| gpt-6-sol | \$2.00 | \$10.00 |
| gpt-5.6-terra | \$2.00 | \$12.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 |
| 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-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 |
| gpt-6.1-terra | \$1.00 | \$5.00 |
| gpt-5.4-mini | \$0.75 | \$4.50 |
| gpt-4.1-mini | \$0.40 | \$1.60 |
| gpt-4.1-mini-2025-04-14 | \$0.40 | \$1.60 |
| gpt-5-mini | \$0.25 | \$2.00 |
| gpt-5-mini-2025-08-07 | \$0.25 | \$2.00 |
| gpt-5.6-luna | \$0.20 | \$1.20 |
| 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-6-luna | \$0.10 | \$0.50 |
| 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 |

## Next Steps

> [card] [All Providers](https://lava.so/docs/gateway/supported-providers.md)
>
> Browse all supported AI providers

> [card] [Forward Proxy](https://lava.so/docs/gateway/forward-proxy.md)
>
> Learn how to construct proxy URLs and authenticate requests


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