#tHow Many Tokens?

← All models

GPT-5.4: token counter & pricing

OpenAI · exact (uses official tokenizer) · pricing as of 2026-05-31.

Provider
OpenAI
API model ID
gpt-5.4
Context window
400,000 tokens
Input price
$2.50 per 1M tokens
Output price
$15.00 per 1M tokens
Tokenizer accuracy
exact (uses official tokenizer)
Pricing as of
2026-05-31

Open the counter to count tokens for GPT-5.4 in real time.

What is GPT-5.4?

GPT-5.4 is the second-most-recent flagship in OpenAI's GPT-5 line (released alongside GPT-5.5). Same o200k_base tokenizer, same 400K context, $2.50 input / $15 output per 1M tokens, half the price of GPT-5.5 on input.

For most production workloads, GPT-5.4 is the sane default: most of GPT-5.5's quality at half the cost.

How tokens are counted here

OpenAI's o200k_base tokenizer. Browser-side via js-tiktoken. Exact.

Pricing notes

$2.50 input / $15 output per 1M (short context). Cached input $0.25/M.

Long-context tier kicks in above 128K input tokens: $5 input / $22.50 output per 1M. This calculator shows the short-context rate. If you're routinely sending prompts above 128K, your effective cost is closer to GPT-5.5's short-tier rate.

Regional processing (data residency) endpoints are charged a 10% uplift.

When to use GPT-5.4

When not to use it:

Common questions

How does GPT-5.4 compare to Claude Sonnet 4.6?

GPT-5.4: $2.50/$15. Claude Sonnet 4.6: $3/$15. GPT-5.4 is 17% cheaper on input, tied on output. Claude often wins on instruction-following nuance; GPT-5.4 often wins on tool use and structured outputs. Run your own evals on your own prompts.

Is GPT-5.4 worth the upgrade from GPT-5.2?

GPT-5.4 ($2.50/$15) costs 43% more on input than 5.2 ($1.75/$14). The upgrade pays off if you've measured a quality win on a workload that fails on 5.2, otherwise stay on 5.2.

What's GPT-5.4 Pro?

$30/$180 per 1M, 12× the base 5.4 input. Use only for measured-difficult tasks where the per-call cost is justified by what a wrong answer costs.

Compare GPT-5.4 to other models