Sub topic 5
Setting an effort level
This chapter covers the effort parameter: what it controls, how to set it in the OpenAI Responses API, how to confirm it changed anything, and which mistakes to avoid. It assumes you can call an LLM API from Python, that you know what tokens, context windows and max output tokens are, and that you know the earlier idea that reasoning models spend hidden reasoning tokens before answering.
What an effort level is
An effort level is a coarse setting that tells a reasoning model how much thinking to do before it answers. You pick a named level such as low, medium or high. The model then decides for itself how many reasoning tokens to spend.
This differs from a token budget, which sets a numeric target. An effort level gives you no number. It shifts the model's tendency to think longer or shorter. The next chapter covers budgets.
Three points define how the setting behaves:
- It is a hint about depth, not a guarantee. The model may spend very few reasoning tokens on an easy prompt even at
high. - It affects only the reasoning stage. Your prompt, the context window and the final answer format are unchanged.
- It changes cost, latency and quality together. Higher effort usually means more reasoning tokens, a slower first visible token, a larger bill and, on hard tasks, better answers.
Provider names and allowed values vary by model and change over time. Check the current documentation for the model you use. The common levels are low, medium and high. Some models also accept lower or higher levels, and some accept only a subset.
Setting effort in the OpenAI Responses API
In the Responses API, you pass a reasoning object with an effort field. The example below also reads how many output tokens went to reasoning.
from openai import OpenAI
client = OpenAI()
response = client.responses.create(
model="o4-mini",
reasoning={"effort": "low"},
input="A train leaves at 14:10 and arrives at 17:45. How long is the trip?",
)
print(response.output_text)
print("reasoning tokens:", response.usage.output_tokens_details.reasoning_tokens)
print("total output tokens:", response.usage.output_tokens)Run it and read the three printed lines. The first is the answer. The second is the number of tokens the model spent thinking. The third is the total output, which includes those reasoning tokens plus the visible answer.
For this question the correct answer is 3 hours 35 minutes. At low effort the model should reach it with a small number of reasoning tokens.
Reading the usage fields
The usage object is the evidence that your setting had an effect. Keep these relationships in mind:
output_tokensis the billed output total.reasoning_tokensis the part of that total spent on hidden reasoning.- The visible answer is roughly
output_tokens - reasoning_tokens.
If reasoning_tokens is far larger than the visible answer, most of your output spend is invisible. That is normal for reasoning models and is the reason to monitor it.
What happens if you omit the parameter
If you leave out reasoning, the model uses its default effort. The default is usually medium, but it depends on the model. Do not assume it. If a result matters, set the value explicitly so your code behaves the same after a provider changes its defaults.
How effort changes behavior
The same prompt can produce very different reasoning lengths at different levels. The diagram shows the typical flow of a request.
Effort interacts with the difficulty of the prompt. The table shows typical behavior, not exact numbers.
| Prompt difficulty | `low` effort | `high` effort |
|---|---|---|
| Easy (time arithmetic, simple lookup) | Correct, fast, few reasoning tokens | Correct, slower, often only slightly more tokens |
| Moderate (multi-step word problem) | Usually correct, occasional slips | More reliable, noticeably more tokens |
| Hard (proofs, tricky code, planning) | More errors, may give up early | Best accuracy, most tokens, longest wait |
The gap between levels grows with difficulty. On easy prompts you pay little for high effort, but you also gain little.
Verifying that effort changed something
Do not trust the setting alone. Send the same prompt at each level and compare the token counts. This short script does that for the OpenAI API.
from openai import OpenAI
client = OpenAI()
PROMPT = (
"A warehouse ships 240 boxes on day one. Each later day it ships 15 more "
"than the day before. On which day does the running total first exceed 5000?"
)
for effort in ("low", "medium", "high"):
response = client.responses.create(
model="o4-mini",
reasoning={"effort": effort},
input=PROMPT,
)
details = response.usage.output_tokens_details
print(
f"{effort:>6}: reasoning={details.reasoning_tokens:5d} "
f"output={response.usage.output_tokens:5d}"
)Expect reasoning to rise from low to high, though not always strictly. A single run is noisy, because sampling is random. If two adjacent levels give similar counts, repeat the call several times and average before drawing a conclusion. The chapter on measuring effort settings builds a fuller harness.
Effort and output limits
Reasoning tokens count toward your output cap. In the Responses API, the parameter max_output_tokens limits reasoning and visible answer together. Higher effort therefore raises the chance that the cap is reached before the answer is finished.
When that happens, the response can come back with an incomplete status and little or no visible text. You still pay for the reasoning tokens that were generated.
Check for this case in code:
from openai import OpenAI
client = OpenAI()
response = client.responses.create(
model="o4-mini",
reasoning={"effort": "high"},
max_output_tokens=300,
input="List the prime numbers between 1 and 200 and state how many there are.",
)
if response.status == "incomplete":
print("Stopped early:", response.incomplete_details.reason)
else:
print(response.output_text)
print("reasoning tokens:", response.usage.output_tokens_details.reasoning_tokens)With a cap this small and high effort, the response is likely to be incomplete. A practical rule is to set the cap generously, then lower effort or simplify the task if latency or cost is a problem, rather than squeezing the cap.
Common errors and gotchas
Sending effort to a model that does not support it
Standard chat models do not have a reasoning stage. Sending a reasoning object to one may raise an error or be ignored, depending on the API and model. Confirm that the model supports the parameter before you ship.
Using the wrong parameter shape for the API
The same idea is spelled differently across APIs. In the Responses API, effort is nested as reasoning={"effort": ...}. In the older Chat Completions API, it is a top-level reasoning_effort parameter. If you copy an example between the two, you will get a validation error or a silently ignored field.
| API | Where effort goes |
|---|---|
| OpenAI Responses | `reasoning={"effort": "low"}` |
| OpenAI Chat Completions | `reasoning_effort="low"` |
Assuming high effort is always better
More thinking does not always improve the answer. On simple tasks it adds cost and delay with no accuracy gain, and on some tasks very long reasoning can talk the model out of a correct first answer. A later chapter on overthinking covers this in detail. For now, treat effort as a dial you tune per task.
Assuming a fixed token count per level
A level does not map to a number of tokens. The same level produces different counts for different prompts, and the same prompt can vary between runs. Budget with ranges, measured on your own data.
Ignoring latency from streaming behavior
Reasoning happens before the visible answer starts. With streaming, the first visible token can arrive much later at high effort than at low, because the model finishes thinking first. If your interface shows a spinner, set user expectations accordingly.
Comparing levels with a single sample
One run per level proves little. Randomness in sampling means a lucky low run can beat an unlucky high run. Use several prompts and repeats before you decide.
A simple decision procedure
Start from the lowest level that could plausibly work, and move up only when the measurements justify it.
- Write five to twenty representative prompts with known correct answers.
- Run them at
lowand record accuracy, reasoning tokens and time. - If accuracy meets your target, stop. Otherwise run
medium, thenhigh. - Pick the lowest level that meets the target.
- Set
max_output_tokenshigh enough to cover the largest reasoning count you saw, plus the answer.
Summary of key points
- Effort is a named level that nudges how long the model reasons. It is not a token count.
- In the Responses API, set it with
reasoning={"effort": "low" | "medium" | "high"}. - Read
usage.output_tokens_details.reasoning_tokensto see what was spent. - Reasoning tokens share the output cap, so high effort with a small cap can return nothing useful.
- Set the value explicitly, verify it with token counts, and choose the lowest level that meets your accuracy target.
Exercise
You call a reasoning model with reasoning={"effort": "high"} and max_output_tokens=500. The response status is "incomplete" and output_text is empty, yet your bill shows 500 output tokens. Explain what happened and give two ways to fix it.
Show answer
The model spent the whole 500-token cap on hidden reasoning tokens, so it never reached the visible answer. Reasoning tokens count toward max_output_tokens and are billed. Fixes: raise max_output_tokens so there is room for reasoning plus the answer, or lower the effort to medium or low (or simplify the task) so the model reasons less. Checking response.status in code lets you detect and handle this case.
Exercise
A colleague copies reasoning_effort="low" into a call to client.responses.create(...) and says it made no difference. What is the likely problem, and how do you verify the setting works after correcting it?
Show answer
reasoning_effort is the Chat Completions spelling. The Responses API expects reasoning={"effort": "low"}, so the original field was rejected or ignored. After correcting it, run the same prompt at low and high and compare usage.output_tokens_details.reasoning_tokens. If the counts differ, the setting is taking effect. Repeat several times, because one sample is noisy.