GPT-5 API pricing
Last reviewed May 28, 2026 · SoftwareEstimator.com
OpenAI’s GPT-5.4 API costs $2.50 per million input tokens and $15 per million output (cached reads $0.25). GPT-5.2 is cheaper at $1.75 / $14; the reasoning model o1 is $15 / $60; o3-mini is $1.10 / $4.40; and GPT-4o is $2.50 / $10. All support a 50% Batch API discount for a 24-hour turnaround. For coding agents, GPT-5.4 sits between Claude Sonnet 4.6 ($3 / $15) and the cheaper Gemini tiers on price. As always, the headline rate matters less than how many tokens an agentic build actually consumes — cache reads dominate the bill, not the per-token price.
2026 OpenAI API rates
Per 1M input / output tokens, with cached-read rates:
- → GPT-5.4 — $2.50 / $15 (cache $0.25)
- → GPT-5.2 — $1.75 / $14 (cache $0.175)
- → o1 — $15 / $60 (cache $7.50)
- → o3-mini — $1.10 / $4.40 (cache $0.275)
- → GPT-4o — $2.50 / $10 (cache $1.25)
- → Batch API — 50% off, 24-hour turnaround
How GPT-5 compares for coding
On price, GPT-5.4 is competitive with Claude Sonnet 4.6 and pricier than the Gemini Flash tiers. The choice for agentic coding usually comes down to capability per retry, not sticker price: a model that solves a task in fewer loops can be cheaper overall even at a higher per-token rate.
Frequently asked questions
How much is the GPT-5 API per million tokens?
GPT-5.4 is $2.50 input / $15 output (cache $0.25). GPT-5.2 is $1.75 / $14. Both get a 50% Batch API discount.
Is GPT-5 cheaper than Claude?
GPT-5.4 ($2.50/$15) is slightly cheaper on input than Claude Sonnet 4.6 ($3/$15) and well below Claude Opus 4.8 ($5/$25). Gemini Flash tiers are cheaper than all of them.
What is the cheapest OpenAI model for coding?
Among the listed tiers, o3-mini ($1.10/$4.40) is the cheapest reasoning option; GPT-4o ($2.50/$10) is cheaper on output than GPT-5.4 but older.
Related guides
Figures are industry-composite estimates for planning, not quotes — agentic token spend has 10×+ run-to-run variance. See the full methodology or run an estimate .