#tHow Many Tokens?

← All models

GPT-5 Mini: token counter & pricing

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

Provider
OpenAI
API model ID
gpt-5-mini
Context window
400,000 tokens
Input price
$0.25 per 1M tokens
Output price
$2.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 Mini in real time.

What is GPT-5 Mini?

GPT-5 Mini is OpenAI's mid-tier GPT-5 model, substantially cheaper than full GPT-5 ($1.25 input → $0.25 input, 5× cheaper) while keeping the same o200k_base tokenizer and 400K context window.

The sweet spot between GPT-5 Nano (too small for harder tasks) and GPT-5 (overkill for routine work).

How tokens are counted here

Counts for GPT-5 Mini come from OpenAI's o200k_base tokenizer, executed locally in your browser through js-tiktoken. Nothing is sent to a server, and because this is the real encoding rather than an approximation, the number is exact. That precision is handy when you are weighing Mini against GPT-5 Nano or full GPT-5: all three share the same tokenizer, so the token count is a constant and the comparison collapses to a straight price-per-token calculation. Count once, then multiply by whichever rate card you are considering.

Pricing notes

$0.25 input / $2.00 output per 1M tokens. Cached input $0.025/M.

For a 1,000-token prompt with 200-token reply: $0.000650 per call, $650 per 1M calls.

When to use GPT-5 Mini

When not to use it:

What GPT-5 Mini costs in production

A common Mini workload is mid-tier summarization: condensing articles, tickets, or call transcripts into structured digests. Say each job sends 4,000 input tokens and returns a 400-token summary, and you process 250,000 jobs per month. That is 1 billion input tokens and 100 million output tokens.

The cheaper escape hatch is GPT-5 Nano ($0.05 / $0.40): the same volume costs $50 + $40 = $90 per month, worth testing if your summaries are formulaic. The pricier route is Claude Haiku 4.5 ($1.00 / $5.00) at $1,000 + $500 = $1,500 per month, more than 3x Mini for the identical token count. Run a sample set through your evals before paying that spread.

Migrating from GPT-4o mini

Change the apiId from gpt-4o-mini to gpt-5-mini and your token counts survive intact: both models tokenize with o200k_base, so prompt budgets measured on 4o mini need no rework. The bill does change. Input rises from $0.15 to $0.25 per 1M tokens and output from $0.60 to $2.00, so output-heavy workloads feel the jump hardest. In exchange you get the 400K context window (up from 128K) and noticeably better reasoning, which in practice means fewer retry loops on tasks 4o mini fumbled. Re-run your evals before flipping production traffic.

GPT-5 Mini vs the obvious alternative

Gemini 2.5 Flash is the closest rival: $0.30 input / $2.50 output against Mini's $0.25 / $2.00, so Mini is modestly cheaper on both sides with a 400K context against Flash's 1M. If your budget conversation is happening a tier lower, DeepSeek V3 at $0.27 / $1.10 undercuts on output; the DeepSeek V3 vs GPT-4o mini comparison covers how that family stacks up against OpenAI's small models.

Common questions

How does GPT-5 Mini compare to GPT-4o mini?

GPT-5 Mini ($0.25/$2.00) is more expensive than GPT-4o mini ($0.15/$0.60) but materially better on reasoning. For most workloads, the upgrade pays for itself in fewer error-recovery loops. For pure cheap-and-fast classification, GPT-4o mini still wins on cost.

Does GPT-5 Mini have the same context window as GPT-5?

Yes, 400K tokens, same as the full GPT-5 family.

What about prompt caching?

Cached input is $0.025/M (10% of standard). On repeated long-context prompts (the same RAG document across many queries), the savings are substantial.

Compare GPT-5 Mini to other models