OpenAI: GPT-4o
by openai
Input price
$2.50 /1M tok
Output price
$10.00 /1M tok
Context length
128K tokens
JSON mode
Yes
Our tests and reviews
-
Best LLM for code review in 2026: Haiku 4.5 beats GPT-4o
May 18, 2026 · We tested four LLMs on six real buggy diffs: Claude Opus 4.7 swept the field, Haiku 4.5 beat GPT-4o 5-0, and GPT-4o finished with zero wins in 2026.
-
Best LLM for SQL generation in 2026: GPT-4o-mini wins clean
May 1, 2026 · Four LLMs, six SQL tasks, one PostgreSQL schema. GPT-4o-mini led with 9 wins over Claude Sonnet 4.5, GPT-4o, and Gemini 2.5 Flash. Here's the full breakdown.
Model details
Model ID
openai/gpt-4o
Provider
openai
Modality
text+image+file->text
Supports response_format
Yes
Supported parameters
| Parameter | Type | Description |
|---|---|---|
| model | string | Model identifier, e.g. openai/gpt-4o |
| messages | array | Array of message objects with role and content |
| temperature | number | Sampling temperature (0-2). Default varies by model. |
| max_tokens | integer | Max tokens to generate |
| top_p | number | Nucleus sampling (0-1) |
| stream | boolean | Stream response via SSE |
| stop | string | array | Stop sequences |
| response_format | object | Set to {"type": "json_object"} for guaranteed JSON output |