The four levels
| Level | For |
|---|---|
| minimal | Classification, extraction, routing — anything where reasoning is overhead. |
| low | Ordinary questions with a bit of judgement. |
| medium | Multi-step problems; comparing options. |
| high | Hard reasoning, long chains, work where being right matters more than being quick. |
Anything outside those four is refused before the call. Leave it out and the model's own default applies.
await api.models.turn({
model: "gemini-3.5-flash",
messages,
thinking: "minimal", // a router does not need to deliberate
maxOutputTokens: 16,
});api.models.turn(
model="gemini-3.5-flash",
messages=messages,
thinking="minimal", # a router does not need to deliberate
max_output_tokens=16,
)What it costs
Thinking tokens are billed at the output rate, like the answer itself. They are reported separately so you can see what you paid for.
const turn = await api.models.turn({ model, messages, thinking: "high" });
turn.usage;
// { credits, inputTokens, outputTokens, thinkingTokens }turn = api.models.turn(model=model, messages=messages, thinking="high")
turn["usage"]
# {"credits", "inputTokens", "outputTokens", "thinkingTokens"}A tight ceiling with a high level can be used up reasoning, leaving a truncated answer or none. Raise the ceiling when you raise the level — or lower the level when the ceiling is what matters.
What that looks like in practice
With a ceiling of 60 tokens and a high level, a turn was measured spending 54 on thinking and 2 on the answer, stopping at the ceiling. The reasoning was fine; there was no room left to say it.
| Symptom | Usually |
|---|---|
| An empty or cut-off answer | The ceiling was spent thinking. Raise it, or lower the level. |
| stopReason is the ceiling | Same cause, stated plainly by the turn. |
| Cost higher than the visible text | thinkingTokens. Look at usage, not at the length of the answer. |
Choosing a level
Default to the lowest that gets the answer right, and raise it only where you have seen it fail. In a loop, the level applies to every turn — so « high » on a twenty-step run is twenty deliberations, most of which were not hard.
// Reason about the plan, not about every step
const level = messages.length <= 2 ? "medium" : "minimal";
const turn = await api.models.turn({ model, messages, tools, thinking: level });# Reason about the plan, not about every step
level = "medium" if len(messages) <= 2 else "minimal"
turn = api.models.turn(model=model, messages=messages, tools=tools, thinking=level)The same thing on a session
A session sets it once, in settings.thinkingLevel, and it applies to everything that session generates — see settings.