Before you start
The first half works in any chat app that has a thinking switch. The second half needs Python 3, the openai package and an OpenAI API key in your environment.
A token is the unit a model reads and writes, often a word or part of one. What are tokens in AI explains the idea if it is new.
See the thinking in a response
Ask a reasoning model a one-line question and the reply looks like any other. The difference is in the usage numbers that arrive with it. OpenAI's reasoning guide says its reasoning models use reasoning tokens to think before they respond, and that the exact count shows up in the response's usage object.
The call below is the guide's own summary example, and it asks for a short summary of the thinking and prints the whole usage object next to it.
from openai import OpenAI
client = OpenAI()
response = client.responses.create(
model="gpt-6-astra",
input="What is the capital of France?",
reasoning={"effort": "low", "summary": "auto"},
)
print(response.output)
print(response.usage) # this line is the lesson's own- In a chat app with a thinking switch, ask one multi-step question twice, once with thinking off and once on. DeepSeek's chat site at chat.deepseek.com calls its switch DeepThink.
- For the code route, run
pip install openaiand make sureOPENAI_API_KEYis set. - Run the call above. If it fails on the summary, delete
"summary": "auto"and run it again. - Find
output_tokens_details.reasoning_tokensin the printed usage and put it besideoutput_tokens. - Change
"effort": "low"to"high", run the same question again and compare the two reasoning counts.
Where the tokens go
OpenAI describes the thinking as the model planning, using tools effectively, inspecting alternatives, recovering from ambiguity and solving harder multi-step tasks. The reasoning tokens are not visible through the API. They still occupy room in the context window and are billed as output tokens.
The usage example in the guide shows what that means. Of 1,186 output tokens, 1,024 were reasoning, which leaves 162 for everything else the response contained. Most of that bill went to text you never read.
Anthropic frames the same idea differently for Claude. Its extended thinking post, published on 24 February 2025 with Claude 3.7 Sonnet, says extended thinking is not a switch to a different model with a separate strategy. It lets the same model give itself more time and effort on an answer.
{
"usage": {
"input_tokens": 75,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 1186,
"output_tokens_details": {
"reasoning_tokens": 1024
},
"total_tokens": 1261
}
}Source: OpenAI Docs: Reasoning models (read November 6, 2026)
Four vendors, four ways to see the thinking
The idea is shared. The plumbing is not. Code written for one provider's reply format will not read another's, so check this table before you parse anything.
| Model family | How it thinks | What you can read |
|---|---|---|
| OpenAI, GPT-5 and GPT-6 | Reasoning tokens before the answer, steered by reasoning.effort | A summary if you set reasoning.summary. The raw tokens never come back |
| Claude Sonnet 5.5 | Adaptive thinking: Claude decides how much to think, steered by output_config.effort | Thinking blocks whose text is empty unless display is summarized. The bill covers the full thinking either way |
| Gemini 4 Argon | Thinking is always on, set with thinking_level | Summaries when thinking_summaries is auto. The usage object counts thought tokens |
| DeepSeek-R1 | Open weights under the MIT license, trained with reinforcement learning to write long chains of thought | Its thinking is plain text at the start of the reply, inside think tags |
Why more thinking helps, and where
Test-time compute is the computation a model spends while it answers, as opposed to while it trains. The paper Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters was posted in August 2024. It asked how much a hard prompt improves when a model gets a fixed amount of that compute. Its abstract does not name the models it tested, so read the figures below as a 2024 research result and not as a claim about today's models.
The answer depended on how hard the prompt was. Choosing the method per prompt made test-time compute more than four times as efficient as a best-of-N baseline, which samples N answers to the same prompt and keeps the best one. In a comparison that matched the compute, a smaller model with some success on a problem could beat a model 14 times larger by thinking longer.
DeepSeek's R1 model card, published on Hugging Face in January 2025, lets you compare two models of the same size. R1 is trained from DeepSeek-V3-Base through a pipeline of two reinforcement learning stages and two supervised fine-tuning stages, and like DeepSeek-V3 it has 671 billion parameters with 37 billion active. Its evaluation table lists them side by side. The before-and-after reading is this lesson's own, not the card's.
The gap is 40 points on AIME 2024, a hard competition-maths test. It is 7 points on MATH-500, where V3 already scored 90. The gain shrinks where the base model was already strong. Anthropic saw a similar curve inside one model. Accuracy on AIME 2024 questions rose logarithmically with the number of thinking tokens Claude 3.7 Sonnet was allowed.
Source: Hugging Face: DeepSeek-R1 model card (read November 6, 2026)
Common mistakes
- Estimating cost from the visible answer. Thinking is billed as output, so the text you read understates what a call costs.
- Reading a summary as the model's full reasoning. OpenAI does not expose the raw tokens, and Anthropic notes that thinking text can include incorrect or half-baked thoughts. Chain of thought prompting covers how far shown reasoning can be trusted.
- Asking for a summary on a model or account that does not offer one. OpenAI says to check the model documentation, and that summaries may need organization verification.
- Carrying the DeepSeek table over to today's models. It is DeepSeek's own evaluation from January 2025. Use it to see the pattern, not to pick a model.
Try it yourself
- Run the Python call at
lowand athigheffort with a question that needs three or four steps, and write down both reasoning counts. - Ask the same question in a chat app with thinking off and then on, and note which answer you would send to a colleague.
- Open the DeepSeek-R1 model card, read its evaluation table, and find a row where V3 scored below R1 and a row where it scored above.
Next: writing prompts a reasoning model likes
Once you can see the thinking, the next question is what to put in the prompt. The next lesson covers goals, constraints and output formats, and it starts from a prompt OpenAI wrote for a reasoning model.
Check yourself
In OpenAI's usage example, 1,024 of 1,186 output tokens are reasoning tokens. What follows from that?
Show answer
B. Most of the billed output was thinking you never see The guide says reasoning tokens are hidden from the API and billed as output tokens, so they make up most of that output.
Which usage field holds the reasoning token count on OpenAI's Responses API?
Show answer
C. output_tokens_details.reasoning_tokens The guide's usage object puts the count under output_tokens_details, next to the overall output_tokens figure.
DeepSeek's model card compares V3 and R1, which have the same size. What does its table show on AIME 2024?
Show answer
D. R1 scored about twice as high The card lists 39.2 for V3 and 79.8 for R1, a gap of about 40 points.
How does Anthropic describe extended thinking in its February 2025 post?
Show answer
A. The same model given more time and effort The post says extended thinking is not a switch to another model but the same model giving itself more time.
Frequently asked questions
What is a reasoning model in AI?
It is a language model that generates a stretch of thinking before its reply and writes the reply from that thinking. Each vendor has its own word for it: reasoning tokens at OpenAI, extended thinking at Anthropic, thinking at Google and a long chain of thought at DeepSeek.
How is a reasoning model different from a regular language model?
A regular model starts writing the answer right away. A reasoning model first generates thinking, which costs time and output tokens, and then writes the answer from it. OpenAI's best practices page describes reasoning models and GPT models as two types that behave differently, and Anthropic let one Claude model switch extended thinking on and off.
Do I pay for reasoning tokens?
Yes. OpenAI bills reasoning tokens as output tokens even though the API does not return them. Anthropic's cookbook says Claude bills the full thinking, not the shorter summary you get back, and counts it toward your rate limits.
Can I read the reasoning?
Sometimes, in a shortened form. OpenAI, Claude and Gemini return summaries when you ask for them. DeepSeek-R1 writes its thinking as plain text inside think tags, so you can read all of it when you run the model yourself.
What is test-time compute?
It is the compute a model uses at the moment it answers, rather than during training. Reasoning models turn it into thinking tokens, and the research paper cited above found that allocating it by prompt difficulty used it more than four times as efficiently as a best-of-N baseline.
Which DeepSeek-R1 model can I run on my own computer?
The card does not match sizes to hardware, so compare its two lists. The full R1 has 671 billion parameters. DeepSeek also released six distilled models from 1.5 billion to 70 billion, built on Qwen and Llama models. The card says they can be served like any Qwen or Llama model, for example with vLLM or SGLang. It notes that each distilled model derives from a base model with its own license.
Sources
- OpenAI Docs: Reasoning models https://developers.openai.com/api/docs/guides/reasoning
- OpenAI Docs: Reasoning best practices https://developers.openai.com/api/docs/guides/reasoning-best-practices
- Anthropic: Claude's extended thinking https://www.anthropic.com/news/visible-extended-thinking
- Anthropic on GitHub: Claude cookbooks, Extended Thinking https://github.com/anthropics/claude-cookbooks/blob/main/extended_thinking/extended_thinking.ipynb
- Google Gemini on GitHub: Get started with thinking https://github.com/google-gemini/cookbook/blob/main/quickstarts/Get_started_thinking.ipynb
- Hugging Face: DeepSeek-R1 model card https://huggingface.co/deepseek-ai/DeepSeek-R1
- Hugging Face Papers: Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters (2024) https://huggingface.co/papers/2408.03314
