# GPT-4o

GPT-4o costs $2.5 per 1M input tokens and $10 per 1M output tokens on LLM API, with a 128K-token context window.

Model ID: `gpt-4o` · OpenAI · Text generation · Released May 13, 2024
Deprecated.
Updated: 2026-10-13
Canonical: https://llmapi.ai/models/openai-gpt-4o/

- Input: $2.5 per 1M tokens
- Output: $10 per 1M tokens
- Cache read: $1.25 per 1M tokens
- Context: 128K tokens
- Max output: 4K tokens

## Pricing

Served by OpenAI, the only provider.

| Price | Amount | Per |
| --- | --- | --- |
| Input | $2.5 | per 1M tokens |
| Output | $10 | per 1M tokens |
| Cache read | $1.25 | per 1M tokens |
| Web search | $0.025 | per search |

**Volume pricing.** At higher monthly volume, GPT-4o may cost less. Book a call and sales will quote a price for your usage. [Book a call with sales](https://meetings.hubspot.com/julia-andriienko/llmapi) or [Create an account first](https://app.llmapi.ai/signup).

## Features

- Tools: Yes
- Parallel tool calls: No
- Image input: Yes
- Reasoning: No
- Prompt caching: Yes
- Structured outputs: Yes
- JSON mode: Yes
- Streaming: Yes
- Web search: Yes
- Batch: Yes

## Call GPT-4o

### Chat Completions (`POST /v1/chat/completions`)

Set LLMAPI_KEY to your LLM API key.

```python
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.llmapi.ai/v1",
    api_key=os.environ["LLMAPI_KEY"],
)

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
```

Docs: [Chat Completions docs](https://docs.llmapi.ai/api/v1/chat/completions)

### Responses (`POST /v1/responses`)

Set LLMAPI_KEY to your LLM API key.

```python
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.llmapi.ai/v1",
    api_key=os.environ["LLMAPI_KEY"],
)

response = client.responses.create(
    model="gpt-4o",
    input="Hello",
)
print(response.output_text)
```

Docs: [Responses docs](https://docs.llmapi.ai/api/v1/responses)

## More from OpenAI

- [GPT-6 Astra](https://llmapi.ai/models/openai-gpt-6-astra/): $10 / $50 per 1M input / output
- [GPT-6.1 Sol](https://llmapi.ai/models/gpt-6-1-sol/): $2 / $10 per 1M input / output
- [GPT-6.1 Terra](https://llmapi.ai/models/gpt-6-1-terra/): $1 / $5 per 1M input / output

Prices synced 2026-11-09.

Next step: [Get API key](https://app.llmapi.ai/signup)
