← Back to API models

GPT-5.4

by OpenAI · coding & agentic workhorse

The previous flagship, now half the price of GPT-5.5. Still the right pick for most production code and agent loops.

Input $2.50 / 1M
Output $15 / 1M
Context 272K tokens
Family 5.4 / mini / nano
OpenAI Platform ↗ Updated May 20, 2026
§ API pricing

Per-token rates.

Input
$2.50/1M tokens
Prompt tokens
  • Half the price of GPT-5.5 input
  • Vision inputs billed as input tokens
  • Same input rate as Claude Sonnet 4.6
Output
$15/1M tokens
Completion tokens
  • Half the price of GPT-5.5 output
  • Equal to Sonnet 4.6 and Grok 4 on output
  • Includes reasoning tokens in thinking mode
Context
272Ktokens
Window
  • Above 200K but below 1M peers
  • Plenty for full codebases up to ~3,000 files
  • No tiered pricing — flat across the window
Mini variant
$0.25/$2 per 1M
GPT-5.4 mini
  • 10× cheaper input than GPT-5.4
  • Same 272K context
  • For well-defined, narrow tasks

Where GPT-5.4 sits today

With GPT-5.5 shipping in April 2026, GPT-5.4 quietly became the better default for most developers. The pricing did not change — $2.50 input and $15 output per 1M tokens — but the relative value moved a lot. GPT-5.5 doubled the rate without doubling the win on most workloads, so the cost-per-correct-answer calculation often still favors GPT-5.4.

OpenAI positions GPT-5.4 as the coding and agentic specialist. In practice that means strong tool-calling discipline, fewer rambling answers, and predictable structured-output behavior. For anything that loops — code agents, multi-step workflows, browser automation — GPT-5.4 is rarely the wrong choice.

Capabilities

GPT-5.4 is multimodal (vision + text + audio in / text + audio out depending on the endpoint), supports the same tool-use surface as GPT-5.5, and ships in three sizes: GPT-5.4, GPT-5.4 mini ($0.25 / $2), and GPT-5.4 nano ($0.05 / $0.40). The full version stays the right pick for code generation, refactors, and any agent that needs to plan more than three steps ahead.

It trails GPT-5.5 on the very longest contexts (272K vs 1M) and on the hardest open-ended reasoning. It beats GPT-5.5 on price-per-token by roughly 2x.

Typical use cases

  • Production coding assistants and IDE plugins
  • Agentic workflows with multiple tools and 3–10 step plans
  • Structured extraction at scale (JSON, schemas, classifications)
  • Customer-facing chat where latency matters as much as quality
  • Vision tasks on receipts, screenshots, and forms

Family and rival comparison

ModelInput / 1MOutput / 1MContext
GPT-5.4$2.50$15272K
GPT-5.4 mini$0.25$2272K
GPT-5.5$5$301M
Claude Sonnet 4.6$3$15200K (1M β)

Sonnet 4.6 is the closest cross-family alternative — slightly more expensive on input, identical on output, comparable quality on most tasks. Pick GPT-5.4 when you live in the OpenAI tool ecosystem; pick Sonnet 4.6 when you want Anthropic's coding style and longer-context beta.

← See all OpenAI / ChatGPT plans