AI API Pricing in 2026: per-1M-token Prices for Every Major Model

AI Token Calculator — updated Aug 2026 · 7 min read

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)

ModelInput / 1MOutput / 1MContext
GPT-5.5$2.50$15.00200K
GPT-5$1.25$10.00400K
GPT-5 mini$0.25$2.00400K
GPT-4o$2.50$10.00128K
GPT-4o mini$0.15$0.60128K
o1 / o3$15.00 / $2.00$60.00 / $8.00200K
Claude Opus 5$5.00$25.00200K
Claude Sonnet 5$2.00$10.00200K
Gemini 3.1 Pro$2.00$12.002M
Gemini 3.5 Flash$1.50$9.001M
DeepSeek V4 Pro$0.44$0.87128K
Qwen3 Max$0.78$3.90262K
GLM-5.1$0.98$3.08200K
Doubao Flash$0.01$0.11128K
Llama 4 (open-weight via hosts)~$0.15~$0.451M

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:

  1. Count input tokens (system prompt + user messages).
  2. Count output tokens (the assistant's reply — you estimate or set a max_tokens).
  3. 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.

→ Open the cost calculator  (free, private)