AI API Pricing in 2026: per-1M-token Prices for Every Major Model
Every serious LLM provider bills per token, and the spread is enormous: from $0.01 per 1M input tokens (Doubao Flash) to $15 input / $60 output (OpenAI o1 / Claude Opus tier). This guide compares 2026 list prices per 1M tokens, shows how to compute a real request cost, and links to a calculator that does the math for you.
2026 price comparison (USD per 1M tokens)
| Model | Input / 1M | Output / 1M | Context |
|---|---|---|---|
| GPT-5.5 | $2.50 | $15.00 | 200K |
| GPT-5 | $1.25 | $10.00 | 400K |
| GPT-5 mini | $0.25 | $2.00 | 400K |
| GPT-4o | $2.50 | $10.00 | 128K |
| GPT-4o mini | $0.15 | $0.60 | 128K |
| o1 / o3 | $15.00 / $2.00 | $60.00 / $8.00 | 200K |
| Claude Opus 5 | $5.00 | $25.00 | 200K |
| Claude Sonnet 5 | $2.00 | $10.00 | 200K |
| Gemini 3.1 Pro | $2.00 | $12.00 | 2M |
| Gemini 3.5 Flash | $1.50 | $9.00 | 1M |
| DeepSeek V4 Pro | $0.44 | $0.87 | 128K |
| Qwen3 Max | $0.78 | $3.90 | 262K |
| GLM-5.1 | $0.98 | $3.08 | 200K |
| Doubao Flash | $0.01 | $0.11 | 128K |
| Llama 4 (open-weight via hosts) | ~$0.15 | ~$0.45 | 1M |
Prices are list prices as of August 2026 and change often. The calculator on our home page preloads 90+ models so you can always check the latest — and override any number with your own contract price.
How to compute the cost of one request
The math is simple once you have the token count:
- Count input tokens (system prompt + user messages).
- Count output tokens (the assistant's reply — you estimate or set a
max_tokens). - Apply the formula
inputTokens × priceIn/1M + outputTokens × priceOut/1M.
Example: a chat with 4,000 input tokens on GPT-4o costs 4,000 × $2.50/1,000,000 = $0.01 input; a 500-token reply adds 500 × $10/1,000,000 = $0.005 — about $0.015 per conversation. On Claude Opus 5 with a 200K system prompt, the same draft would cost ~$1.00 just for input. That's a 60× difference at the extremes, which is why pricing tables matter.
Fine-tuned and “thinking” models cost more
Reasoning models (o1, o3, DeepSeek R1, Gemini with thinking) bill reasoning tokens at output-tier prices. A coding task on o1 can output 8,000 thinking tokens before a single visible character — often making it 5–10× pricier than GPT-5 per real task. Budget with the output column, not the input column.
7 ways to cut LLM API bills
- Trim the system prompt — every redundant instruction is billed on every call.
- Cache prefix (Anthropic prompt caching, Gemini context caching) for repeated system prompts.
- Move bulk jobs to mini models (GPT-4o mini, Gemini Flash-Lite, Doubao Flash).
- Set
max_tokens— runaway reasoning tokens kill budgets. - Batch embeddings instead of calling per-row.
- Summarize conversation history instead of appending it forever.
- Use the right tokenizer to size prompts before you ship — that's what a token counter is for.
Compute your own cost with real token counts
Our token & cost calculator runs the real tiktoken tokenizer locally (nothing is uploaded), preloads 2026 list prices for 90+ models, and shows per-request input, output and total cost live while you type.