Thinking
Turn reasoning on, off, or down for Claude, Gemini, and GPT models from any protocol.
Reasoning tokens are billed as output tokens, so controlling them controls cost and latency. Use your protocol's own reasoning fields with any model: a reasoning_effort sent on Chat Completions takes effect on Claude and Gemini models too.
Controls per protocol
| Protocol | Fields |
|---|---|
| Chat Completions | reasoning_effort; thinking: {"type": "enabled", "budget_tokens": N}, {"type": "adaptive"}, or {"type": "disabled"}; OpenRouter's reasoning object and include_reasoning |
| Responses | reasoning.effort |
| Messages | thinking, output_config.effort |
| Gemini | generationConfig.thinkingConfig: thinkingLevel, thinkingBudget, includeThoughts |
On a model's native protocol, these fields reach the model as you sent them and follow the vendor's documentation: reasoning_effort on GPT, thinking on Claude through Messages, thinkingConfig on Gemini through the Gemini endpoint, and vendor fields such as DeepSeek's thinking or Qwen's enable_thinking on Chat Completions.
On Chat Completions, reasoning_effort takes precedence over the reasoning object, which takes precedence over include_reasoning. Effort levels are none, minimal, low, medium, high, xhigh, and max.
When a request is converted for a model, a level that the model family doesn't have becomes the nearest one it has. low, medium, and high stay as they are:
| You send | Claude | Gemini | GPT |
|---|---|---|---|
minimal | low | minimal on models that have it, low on the others | minimal |
xhigh | xhigh on Opus 4.7 and the models released after it, high on earlier ones | xhigh on Gemini 4 Hydrogen and Gemini 4 Neon, high on the others | xhigh |
max | max | The same as xhigh | xhigh |
OpenRouter's reasoning object on Chat Completions becomes an effort level. The first field present in this order decides:
reasoning field | Effort level |
|---|---|
effort | That level |
max_tokens | high from 80% of the request's output limit, medium from 50%, low below that. Without an output limit, medium. 0 is none. |
enabled | medium for true, none for false |
When you call another model family through the Gemini endpoint, the first of these fields present decides:
thinkingConfig field | Effect |
|---|---|
thinkingLevel | That effort level |
thinkingBudget | Thinking with that budget. 0 turns thinking off. -1 is effort medium. |
includeThoughts: true | Effort medium |
None of them, as in "thinkingConfig": {} | Thinking off |
Claude
On Chat Completions, Responses, or Gemini, Claude models take these settings:
| You send | Effect on Claude |
|---|---|
thinking: {"type": "enabled", "budget_tokens": N} | Extended thinking with that budget |
thinking: {"type": "adaptive"} | Claude decides when and how much to think |
reasoning_effort / reasoning.effort | Claude's effort level; on Claude Fable 5, 5.1 and 5.2 it also turns on adaptive thinking |
thinking: {"type": "disabled"}, effort none, or thinkingBudget: 0 | Thinking off, except on the models that always think |
curl https://api.ohmygpt.com/v1/chat/completions \
-H "Authorization: Bearer $OHMYGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-haiku-4-5",
"max_tokens": 1500,
"messages": [{"role": "user", "content": "What is 17 * 23? Reply with the number only."}],
"thinking": {"type": "enabled", "budget_tokens": 1024}
}'{
"choices": [
{
"finish_reason": "stop",
"native_finish_reason": "end_turn",
"message": {
"role": "assistant",
"content": "391",
"reasoning": "17 * 23 = ?\n\nLet me calculate this:\n17 * 23 = 17 * 20 + 17 * 3\n= 340 + 51\n= 391",
"reasoning_details": [{ "type": "reasoning.text", "text": "17 * 23 = ?\n\n…", "signature": "EuoCCrgB…", "index": 0 }]
}
}
],
"usage": { "prompt_tokens": 51, "completion_tokens": 60, "total_tokens": 111, "completion_tokens_details": { "reasoning_tokens": 54 } }
}Newer Claude models think adaptively. Use the setting each model takes:
| Model | Use |
|---|---|
| Claude Opus 5.5, Opus 5, Sonnet 5.5, Sonnet 5, Haiku 5.5, Fable 5, Fable 5.1, Fable 5.2, Opus 4.8, Opus 4.7 | {"type": "adaptive"} with an effort level, instead of a token budget |
| Claude Opus 5.5, Fable 5, Fable 5.1, Fable 5.2 | A low effort level to keep thinking short; these models always think |
| Earlier Claude models | {"type": "enabled", "budget_tokens": N} |
Other settings reach the model as you sent them; if the model doesn't take one, its own error comes back to you, and a rejected request is not charged.
Models where thinking off differs
A request to turn thinking off is sent to Claude as thinking: {"type": "disabled"}, except on these models:
| Model | What Claude receives |
|---|---|
| Claude Opus 5.5, Fable 5, Fable 5.1, Fable 5.2 | thinking: {"type": "adaptive"} with effort low. These models always think. |
| Claude Sonnet 5.5 | thinking: {"type": "between_tools"}, the value that turns thinking off on this model |
On Messages, Claude receives thinking as you sent it. Send the value from this table yourself.
Gemini
On Chat Completions, Responses, or Messages, Gemini models take these settings:
| You send | Effect on Gemini |
|---|---|
thinking: {"type": "enabled", "budget_tokens": N} | Thinking budget of N tokens, thoughts returned. On Gemini 4 models, the budget becomes a thinking level: low up to 1,024 tokens, medium up to 8,192, high above that. |
reasoning_effort: "low", "medium", "high" | Thinking level, thoughts returned |
reasoning_effort: "minimal" | Thinking level minimal if the model has it, otherwise low, thoughts returned |
reasoning_effort: "none", thinking: {"type": "disabled"}, or budget_tokens: 0 | Thinking level minimal if the model has it, otherwise low, no thoughts returned |
thinking: {"type": "adaptive"}, or enabled without a budget, and no effort level | The model's own default |
The models that have minimal are the ones in the first list below and google/gemini-3.1-flash-lite-image.
Only some Gemini models can stop thinking. On google/gemini-3.6-flash, google/gemini-3.5-flash, google/gemini-3.5-flash-lite, google/gemini-3.1-flash-lite, and google/gemini-3-flash-preview, the lowest level usually means no thinking at all. google/gemini-3.8-flash, google/gemini-3.7-flash, google/gemini-3.1-pro-preview, and google/gemini-4-argon always think: on google/gemini-3.8-flash, a one-line question used 44 to 84 reasoning tokens with none, against 86 to 177 by default. If you need answers without reasoning tokens, pick a model from the first list.
Measured on google/gemini-3.1-flash-lite with the same prompt as above:
reasoning_effort | completion_tokens_details.reasoning_tokens |
|---|---|
none | absent; the model did not think |
low | 118 |
high | 229 |
curl https://api.ohmygpt.com/v1/chat/completions \
-H "Authorization: Bearer $OHMYGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-3.1-flash-lite",
"messages": [{"role": "user", "content": "What is 17 * 23? Reply with the number only."}],
"reasoning_effort": "none"
}'Other models
When a request is converted for a GPT model, an effort level other than none becomes reasoning_effort, or reasoning.effort on Responses. A thinking budget also becomes an effort level: 1,024 tokens is low, 4,096 is medium, and any other budget is high.
To turn reasoning off on a GPT model that has a none level, call Chat Completions with reasoning_effort: "none", or Responses with reasoning.effort set to none. On Chat Completions, use reasoning_effort for this and not the reasoning object. thinking: {"type": "disabled"} from Messages and thinkingBudget: 0 from the Gemini endpoint are not sent to GPT. The model then uses its default effort.
GPT reasoning models take temperature and top_p only with reasoning off; while they reason, these parameters are not sent (see Parameters).
On DeepSeek, Qwen, and other models, the effect of a converted setting depends on the model. To control reasoning exactly, call the model on a native protocol with the vendor's own fields.
Reasoning in the response
Reasoning tokens are reported in usage on every protocol:
| Protocol | Field |
|---|---|
| Chat Completions | usage.completion_tokens_details.reasoning_tokens |
| Responses | usage.output_tokens_details.reasoning_tokens |
| Gemini | usageMetadata.thoughtsTokenCount |
| Messages | included in usage.output_tokens |
The visible reasoning comes back as reasoning and reasoning_details on Chat Completions, reasoning output items on Responses, thinking blocks on Messages, and parts with "thought": true on Gemini.
Still stuck? Live chat · [email protected] · Telegram group