Reasoning Tokens Billing: Why Your Bill Runs High and How to Fix It
The rule for reasoning tokens billing fits in one sentence: major providers count a reasoning model's thinking tokens as output tokens and charge them at the output rate. They also count against the output limit you set, and many APIs return only a summary of the thinking, or nothing at all. So you may see a 200-word answer in the UI while the output on your bill is several times larger. Most of the difference was spent on the model "thinking".
This article does not explain how reasoning models work. It covers three things: how to find reasoning tokens in your bill, how to control them per task, and how to spot requests where the output limit was too low and the model "thought but never answered".
What reasoning tokens are, and why they are billed as output
Before giving its final answer, a reasoning model generates a stretch of intermediate reasoning. To the model this is no different from ordinary output: it is decoded one token at a time, so providers price it as output tokens.
Three things set it apart from normal output:
- It is not necessarily returned to you. Some APIs return no thinking content, some return a summary, and some return the full text. When you get a summary, billing is based on the full number of thinking tokens, not on the length of the summary.
- It counts against the output limit. The
max_tokensyou set (or its equivalent) is usually the total for "thinking + answer", not a separate allowance for the answer. - Its length is not directly under your control. For the same question the model might think for a few hundred tokens one time and a few thousand the next. Hard problems, long context and vague instructions all make it think longer.
If you are not yet sure which parts make up the bill for a single call, start with How token billing works: a line-by-line breakdown of one API call. This article assumes you already know that input, output and cache hits are priced separately.
Why reasoning tokens inflate cost so much
Output pricing is usually a multiple of input pricing. We ran a simple calculation on the OpenRouter public model catalog that the cdnping model monitor captured on 2026-10-17. Using the listed prices of the 16 model entries in the snapshot, we computed output price divided by input price:
| Output/input price ratio | Entries |
|---|---|
| About 3x (3.0–3.4) | 6 |
| 4x | 2 |
| About 5x | 7 |
| About 39x | 1 |
Source: cdnping data snapshot, model prices from the OpenRouter public API, collected 2026-10-17. This is a single-day snapshot, and prices can change at any time.
This means the same extra 1,000 tokens cost 3 to 5 times more on the output side than on the input side, and for a few models the gap is much larger. Say a request has 2,000 input tokens, 300 output tokens for the answer and 2,000 reasoning tokens. At a 5x price ratio, the reasoning part costs 5 times the input part and more than 6 times the answer part. That is usually where a bill "higher than expected" comes from.
For other factors that are easy to miss when comparing prices, see How to compare LLM API prices: 5 places where per-million-token rates mislead you.
Finding reasoning tokens in your bill: usage fields by provider
Always start with the usage object in the response. Do not estimate from how long the reply looks. The table below lists field names from each provider's official docs. These APIs are still evolving, so check the current official docs before you integrate.
| API | Where the reasoning tokens are | Already included in the output total? | Control parameters |
|---|---|---|---|
| OpenAI Chat Completions | usage.completion_tokens_details.reasoning_tokens | Yes, included in completion_tokens | reasoning_effort, max_completion_tokens |
| OpenAI Responses | usage.output_tokens_details.reasoning_tokens | Yes, included in output_tokens | reasoning.effort, max_output_tokens |
| Anthropic Messages | No separate field; counted in usage.output_tokens | Yes | thinking.budget_tokens (must be less than max_tokens) |
| Gemini | usageMetadata.thoughtsTokenCount | No; listed separately from candidatesTokenCount, and both are billed as output | thinkingConfig.thinkingBudget |
| OpenAI-compatible APIs from Chinese providers and aggregators | Commonly reuse completion_tokens_details.reasoning_tokens; some also return the raw text in reasoning_content | Usually included | Parameter names vary by provider; see each one's docs |
Two common misreadings:
- Anthropic has no separate reasoning field. When
output_tokensis far larger than the length of the text you received, the difference is thinking. If the thinking you get back is a summary, it is normal for the summary length not to match the billed token count. - Gemini lists reasoning tokens separately. If your reconciliation script only sums
candidatesTokenCount, it will consistently undercount.
When you call through a relay or aggregation gateway, also confirm whether it passes these fields through unchanged, or applies its own counting rules when it bills you. For how to check, see AI API bill doesn't match: token counting differences and how to verify.
Hands-on: work out your reasoning token share
Record the usage from a recent batch of requests and compute the share of output that is reasoning.
Step 1: send one request and look at usage. Using an OpenAI-compatible Chat Completions endpoint as an example:
curl -s "$BASE_URL/v1/chat/completions" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "<your reasoning model>",
"messages": [{"role": "user", "content": "Group the primes from 1 to 100 by their last digit"}],
"max_completion_tokens": 4000
}' | jq '.usage, .choices[0].finish_reason'
Step 2: compute it in bulk. Assume you have written the usage of each response to usage.jsonl, one per line:
import json
total_out = total_reason = 0
for line in open("usage.jsonl"):
u = json.loads(line)
out = u.get("completion_tokens") or u.get("output_tokens") or 0
details = u.get("completion_tokens_details") or u.get("output_tokens_details") or {}
reason = details.get("reasoning_tokens", 0)
total_out += out
total_reason += reason
print(f"Total output {total_out}, of which reasoning {total_reason}, share {total_reason / max(total_out, 1):.1%}")
For Gemini, change the field to thoughtsTokenCount and add it to candidatesTokenCount. Anthropic has no separate field, so you can roughly estimate it as output_tokens minus the token count of the answer text.
Step 3: break it down by task type. Tag requests by purpose (completion, classification, code review, complex refactoring) and compute the share for each. If simple tasks also show a high reasoning share, that is usually the easiest place to save.
Setting reasoning effort and thinking budget per task
The idea is to match the amount of thinking to the difficulty of the task, rather than turning it up to maximum everywhere.
| Task | Suggestion | Notes |
|---|---|---|
| Format conversion, classification, field extraction | Turn thinking off, or use a non-reasoning model | More thinking usually does not make these more accurate |
| Everyday Q&A, small code edits | Low reasoning effort, or a small thinking budget | Start low and raise it if quality is not enough |
| Code review, multi-step derivation | Medium effort | Compare low and medium results before deciding |
| Complex refactoring, long-running agents | High effort or a larger budget | Also leave plenty of room in the output limit |
In practice:
- Set a default level first. At the client or gateway layer, fix the reasoning effort (
low/medium/high) or thinking budget for each task type, rather than letting every caller fill it in on their own. - A/B test on the same samples. For example, take a few dozen real requests and run them at two levels, then compare result quality and the total reasoning tokens from step 2 above. Write down both the savings and the quality difference before deciding.
- Route requests that do not need reasoning elsewhere. In many cases the cheapest fix is not tuning parameters but switching models. For routing by task, see How to do multi-model routing: cut LLM cost by routing per task.
- Combine with prompt caching. Reasoning tokens generated in this call do not get cheaper because of caching, but long system prompts and fixed context do, and the input-side savings offset part of the cost. For billing details see How prompt caching is billed: writes, hits and expiry.
Reasoning also affects latency. Thinking tokens are decoded one by one too, so the wait until the first character of the answer gets noticeably longer. For this, see How to read model output speed in tokens/s.
max_tokens too low: reasoning but no answer
This is the most common "paid but got nothing" case with reasoning models. The output limit is shared by thinking and the answer. If the model uses up the allowance halfway through thinking, the answer is empty or half a sentence, but the thinking is still billed.
How to recognize it
| API | Signs |
|---|---|
| OpenAI Chat Completions | finish_reason is length, content is empty or very short, and reasoning_tokens is close to completion_tokens |
| OpenAI Responses | status is incomplete and incomplete_details.reason is max_output_tokens |
| Anthropic Messages | stop_reason is max_tokens, and the response contains only a thinking block or a very short text block |
| Gemini | finishReason is MAX_TOKENS and thoughtsTokenCount accounts for most of the output |
Checklist
- Do your logs record
finish_reason/stop_reason? If not, add it first, otherwise these requests get mistaken for "the model gave a short answer". - Is the output limit carried over from the non-reasoning era, such as 512 or 1024? Reasoning models need room for thinking.
- Is the relationship between thinking budget and output limit right? For example, Anthropic requires
budget_tokensto be less thanmax_tokens, and the difference is what remains for the answer. - Is there automatic retry upstream? Retrying a truncated request unchanged pays for the thinking again and will most likely be truncated again. Raise the limit or lower the reasoning effort before retrying.
- When streaming, does the frontend treat "no answer text for a long time" as a hang and disconnect? Thinking tokens generated before the disconnect are generally still billed.
Order of checks when the bill suddenly rises
- First check whether usage itself changed. Did the request count or input tokens go up?
- Then check the reasoning share. Compare two periods with the script above. A clear rise in share means the amount of thinking changed.
- Check whether the configuration was changed. Reasoning effort, thinking budget and default model: a client upgrade sometimes swaps in new defaults.
- Check for upstream changes. Model updates, default reasoning level adjustments and price changes can all make the same request cost more. cdnping's service changes page records additions and removals in each provider's changelog and pricing page line by line, and the model monitor records price changes on OpenRouter. For a more systematic approach to tracking, see How to find out right away when an LLM API price changes.
- Check truncation retries. Count the share of requests with
finish_reasonoflength(or an equivalent value), and whether they are immediately followed by a retry.
Field and parameter names are still being adjusted by each provider, so rely on the official docs when you integrate or upgrade an SDK. If your bill is settled through a relay or aggregation gateway, first confirm its billing rules with How to choose an AI API relay: 8 checks on uptime, billing and data policy.