Hidden LLM API Costs: Reasoning Tokens, Surcharges and More
The per-million-token price is not the whole bill. These extras explain why invoices often come in above estimates.
Reasoning (thinking) tokens
Many models think before answering, and those tokens are usually billed as output. A short visible answer can hide thousands of reasoning tokens, so output volume can be much larger than the text you see.
Long-context surcharges
Several models charge more above a prompt size threshold. See long-context price cliffs.
Priority and regional pricing
- Gemini offers a priority tier at 1.8 times standard pricing for guaranteed availability.
- OpenAI notes that regional processing adds 10%.
Tool and search costs
Web search, code execution and other tools can carry per-call fees on top of tokens, and their results add input tokens to the next step.
Agents multiply everything
An agent that loops through many steps resends context each time. Cost per task can be many times the cost of a single call. Caching helps a lot here, see prompt caching explained.
Price changes
Providers cut and raise prices often. Review your price table each month.
Reasoning tokens in numbers
Suppose a model returns a visible answer of 300 tokens but uses 2,000 tokens of reasoning first, billed as output at $10 per million. The real output is 2,300 tokens, about $0.023, instead of the $0.003 you would expect from the visible text. That is almost eight times higher. Many providers let you control reasoning effort or set a budget, which is worth testing for simple tasks.
Agents and loops
An agent that takes ten steps, resending a 20,000-token context each time, bills 200,000 input tokens, about $0.40 on a $2 per million model, before counting tool results and output. If steps are retried, the total grows. Cost per task, not cost per call, is the number to watch. Caching the stable part of the context reduces this a lot.
Retries and failures
Timeouts, rate-limit errors and malformed outputs lead to retries. Each retry can bill again. Track the share of calls that are retries, and fix the cause rather than just retrying.
Tools and extras
- Web search and code execution tools can have a per-call fee
- Files, images and audio are converted to tokens and billed as input
- Fine-tuned or dedicated deployments may charge hourly or per-seat fees
- Embeddings and moderation calls are billed separately
Taxes and currency
Provider prices are usually quoted in US dollars before tax. Depending on your country, VAT or other taxes may be added, and your bank may apply exchange fees. Add these to your budget.
Price drift
Prices move in both directions, and promotional rates end, such as an introductory price that later doubles. Review your price table monthly, and note the date you last checked each model.
A simple safety margin
When you forecast, take the base estimate from token counts and list prices, then add 20 to 30 percent for reasoning tokens, retries, tools and taxes. After a month of real data, replace the margin with your actual ratio.
Frequently asked questions
Can I see reasoning tokens?
Usually the usage field reports them as part of output tokens, even if the text itself is hidden.
Are failed requests billed?
It depends on the failure. Requests that complete but return poor output are billed normally. Check your provider's rules for errors and timeouts.
How do I find surprises early?
Set a budget alert and review daily usage for the first weeks of any new feature. The AI spend tracker helps you spot changes by model and team.
Build a safety margin
Estimate with the cost calculator, then add a margin of 20 to 30 percent for these extras and track real spend with the AI spend tracker.
Track spend by team and project: the AI Spend Tracker spreadsheet is launching soon.