reasoning_effort to adjust how much they reason.
Set BASETEN_API_KEY to your Baseten API key. For the Python and JavaScript examples, install the OpenAI SDK.
Control reasoning
Reasoning is on by default for most models. Setreasoning_effort to none to request a direct answer, though some models still reason at a lower depth with none; Set reasoning depth shows the depth each value reaches on each model.
Models not listed here don’t support reasoning in Chat Completions.
Beam and Muse Spark Open always reason. Beam accepts
none and enable_thinking: false but keeps reasoning on; use minimal for its lightest budget. To enable Nemotron Super 3.5, set reasoning_effort to high. GLM 5.3 accepts chat_template_args.enable_thinking: false, but responses can still include reasoning_content.- Python
- JavaScript
- cURL
Set
chat_template_args.enable_thinking to true to enable reasoning:enable_thinking.py
Set reasoning depth
Reasoning depth describes how much reasoning a model performs before producing its final answer. A higher setting can use more reasoning tokens and take longer to respond. Set the top-levelreasoning_effort parameter to request a depth. Models can map several values to the same level; the effective depth column shows how each listed value behaves. A (default) label identifies the effort level used when you omit reasoning_effort.
As sent means the model uses the effort level you request.
none turns reasoning off on every model whose row lists it, unless the effective depth column says otherwise. On the GLM 5.3 models it runs at low. OpenAI GPT 120B can return reasoning_content with none. Beam and Muse Spark Open reason regardless.
- Python
- JavaScript
- cURL
Set
reasoning_effort to high to request high reasoning effort:reasoning_effort.py
Parse the response
The message object returns reasoning inreasoning_content and the final answer in content.
- Python
- JavaScript
- cURL
Read
reasoning_content for the reasoning and content for the final answer:parse_reasoning.py
Response
completion_tokens and counts them toward your total usage and billing.
Model-specific behavior
Beam conversation history
Beam requiresreasoning_content on prior assistant messages. Preserve it alongside content when constructing a multi-turn request. Omitting it returns HTTP 400.
With an OpenAI SDK installed and BASETEN_API_KEY set, send the first response’s reasoning back in the next request.
- Python
- JavaScript
To continue a Beam conversation:
beam_history.py
Output
chat_template_kwargs: {"allow_missing_thinking": true}. In the OpenAI Python SDK, pass it through extra_body={"chat_template_kwargs": {"allow_missing_thinking": True}}. This bypasses the missing-history check; preserving reasoning is the recommended path.
Beam returns reasoning in message.reasoning_content and counts it in usage.completion_tokens_details.reasoning_tokens.
Reasoning token budget
max_tokens caps the whole completion, reasoning tokens included. reasoning.max_tokens caps reasoning tokens alone: once the model reaches that many reasoning tokens, it stops reasoning and spends the rest of max_tokens on its final answer. Set max_tokens above the reasoning budget so the model has room to answer.
Only DeepSeek V4 Flash 0731 enforces reasoning.max_tokens. It stops reasoning at 4,096 tokens by default, including at reasoning_effort: max. Raise the budget when a problem needs more reasoning room:
- Python
- JavaScript
- cURL
Pass
reasoning through extra_body since it extends the standard OpenAI API:reasoning_budget.py
Next steps
For more information about custom API endpoints and additional request parameters, see the OpenAI Python SDK documentation and OpenAI JavaScript SDK documentation.Model APIs overview
Review supported models, pricing, and features.
Structured outputs
Constrain reasoning model output to a JSON schema.