Models / OpenAI / GPT-5.4
OpenAI

GPT-5.4

BYOKClosedReleased 5 Mar 2026

A closed-weight OpenAI model with a very large context window, released March 2026. It stands out for terminal and coding agent tasks, but it costs well above most of the registry.

Read the full description ↓

Spec sheet

Family
OpenAI
Released
5 Mar 20269 months ago
Weights
Closed
Context window
1.1M tokens
Largest response
128k tokens
Accepts
text, image, file
Supports
tools, reasoning, structured output
Knowledge cutoff
August 2025
Intelligence index
67.9#30
Input price
$2.5 / 1M
Output price
$15 / 1M
Blended price (3:1)
$5.63 / 1M
Index points per $
12.1#93
Speed
59 tokens/sec#106
Popularity
#90 of 194by usage
Providers
3

Benchmarks

Score · rank among models tested

The tick on each bar marks the registry median; hover over a bar for the numbers. Sources and how the index is computed: methodology.

Providers and prices

$ per 1M tokens · from genai-prices
ProviderGatewayPydantic AI model stringInputCached inputOutputBlended
OpenAIgateway/openai:gpt-5.4 $2.5$0.25$15$5.63
AWS Bedrockgateway/bedrock:openai.gpt-5.4 $2.75$0.28$17$6.19
OpenRouterBYOKopenrouter:openai/gpt-5.4 $2.5$0.25$15$5.63

The cheapest provider is highlighted. Blended price assumes three input tokens for each output token.

Example code

# /// script
# dependencies = ["pydantic-ai"]
# ///
import os

from pydantic_ai import Agent

os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'

agent = Agent('gateway/openai:gpt-5.4', instructions='Be concise, reply with one sentence.')

result = agent.run_sync('Where does "hello world" come from?')
print(result.output)

Ask GPT-5.4 a question with a Pydantic AI agent and print the answer. Run it with uv run hello.py.

Compare

GPT-5.4vsGrok 4.7
Intelligence index
205590$0.1$1$10Grok 4.7: 68 at $3 blendedGPT-5.4: 67.9 at $5.63 blended
GPQA Diamond
5075100$0.1$1$10Grok 4.7: 92.7% at $3 blendedGPT-5.4: 93.3% at $5.63 blended
OTIS Mock AIME
4070100$0.1$1$10Grok 4.7: 98.1% at $3 blendedGPT-5.4: 97.8% at $5.63 blended
FrontierMath
1055100$0.1$1$10Grok 4.7: 53% at $3 blendedGPT-5.4: 78.6% at $5.63 blended
ARC-AGI-2
050100$0.1$1$10Grok 4.7: 61.4% at $3 blendedGPT-5.4: 74% at $5.63 blended
SimpleQA Verified
1055100$0.1$1$10Grok 4.7: 56% at $3 blendedGPT-5.4: 45.1% at $5.63 blended
SWE-bench Verified
507090$0.1$1$10GPT-5.4: 76.9% at $5.63 blended
Terminal-Bench
04590$0.1$1$10GPT-5.4: 81.8% at $5.63 blended
SciCode
204570$0.1$1$10Grok 4.7: 57.8% at $3 blendedGPT-5.4: 56.6% at $5.63 blended
WebDev Arena
122015251830$0.1$1$10Grok 4.7: 1637.5 at $3 blendedGPT-5.4: 1463 at $5.63 blended
APEX-Agents
04590$0.1$1$10Grok 4.7: 70% at $3 blendedGPT-5.4: 52.4% at $5.63 blended
LMArena text
128014101540$0.1$1$10Grok 4.7: 1400.6 at $3 blendedGPT-5.4: 1468.8 at $5.63 blended
Epoch Capabilities Index
120150180$0.1$1$10Grok 4.7: 156.4 at $3 blendedGPT-5.4: 157.9 at $5.63 blended

Score against blended price per 1M tokens (log scale). GPT-5.4   Grok 4.7   other models

Intelligence indexOur composite of the benchmarks below, 0-100
GPT-5.467.9
Grok 4.768
GPQA DiamondGraduate-level science questions, multiple choice
GPT-5.493.3%
Grok 4.792.7%
OTIS Mock AIMECompetition mathematics problems with exact answers
GPT-5.497.8%
Grok 4.798.1%
FrontierMathOriginal research-level mathematics problems, tiers 1 to 3
GPT-5.478.6%
Grok 4.753%
ARC-AGI-2Abstract visual puzzles that test learning a new rule from a few examples
GPT-5.474%
Grok 4.761.4%
SimpleQA VerifiedShort factual questions answered from memory, without search
GPT-5.445.1%
Grok 4.756%
SWE-bench VerifiedReal GitHub issues resolved, run by Epoch with one fixed scaffold
GPT-5.476.9%
Grok 4.7–
Terminal-BenchTasks completed in a terminal; the best result of any agent using the model
GPT-5.481.8%
Grok 4.7–
SciCodeScientific programming problems written by researchers
GPT-5.456.6%
Grok 4.757.8%
WebDev ArenaRating from human votes on web apps the models built
GPT-5.41463
Grok 4.71637.5
APEX-AgentsLong professional tasks (banking, consulting, law) passed on the first attempt
GPT-5.452.4%
Grok 4.770%
LMArena textRating from blind human votes between pairs of chat responses
GPT-5.41468.8
Grok 4.71400.6
Epoch Capabilities IndexEpoch AI's own composite across about 40 benchmarks; shown for comparison, not part of our index
GPT-5.4157.9
Grok 4.7156.4
Input pricePer 1M tokens, lower is better
GPT-5.4$2.5
Grok 4.7$2
Output pricePer 1M tokens, lower is better
GPT-5.4$15
Grok 4.7$6
EfficiencyIndex points per blended $
GPT-5.412
Grok 4.723
SpeedOutput tokens per second
GPT-5.459 t/s
Grok 4.773 t/s
Context windowTokens
GPT-5.41.1M
Grok 4.7500k
Model stringFor Pydantic AI
GPT-5.4gateway/openai:gpt-5.4
Grok 4.7xai:grok-4.7

About GPT-5.4

Description written by an LLM from the data on this page

A closed-weight OpenAI model with a very large context window, released March 2026. It stands out for terminal and coding agent tasks, but it costs well above most of the registry.

GPT-5.4 is a closed-weight model from OpenAI, released March 2026 and offered through OpenAI, AWS Bedrock and OpenRouter. It accepts text, images and files, supports tool calling and structured output, and has a 1.05M-token context window.

Its strongest results are agentic. It ranks 2nd of 35 on Terminal-Bench at 81.8% and 7th of 23 on SWE-bench Verified at 76.9%. Its intelligence index of 67.9 ranks 31st of 114. Factual recall is weaker, with SimpleQA Verified just below the median.

The main drawback is cost. Output costs $15 per million tokens, and the blended price of $5.63 ranks 162nd of 194. Its intelligence per dollar ranks 93rd of 194, so it suits work where capability justifies the spend.

Strengths

  • 81.8% on Terminal-Bench, 2nd of 35 models tested
  • 76.9% on SWE-bench Verified, 7th of 23 models tested
  • Intelligence index 67.9, 31st of 114 and above the median
  • 1.05M-token context window with responses up to 128k tokens

Weaknesses

  • Blended price $5.63 per million tokens, 162nd of 194 on price
  • SimpleQA Verified 45.1%, just below the 46.5% median
  • WebDev Arena rating 1463, 50th of 85 and below the median

Best for

Agents that run terminal tasks or fix code in large repositories, where capability matters more than price.

One key, every model

Pydantic AI Gateway gives you the models marked with a single API key, spending limits and Logfire tracing. Bring your own key for the rest.

Start free  Read the docs