Skip to main content
Some Model APIs support extended thinking, where the model reasons through a problem before producing a final answer. The reasoning process generates additional tokens that appear in a separate reasoning_content field, distinct from the final response.

Supported models

Models not listed here don’t support reasoning.

Enable thinking

For models marked opt-in in the table above, enable thinking by passing chat_template_args.
Pass chat_template_args through extra_body since it extends the standard OpenAI API:
enable_thinking.py

Control reasoning depth

The reasoning_effort parameter controls how thoroughly the model reasons through a problem. DeepSeek V4 Pro, DeepSeek V4 Flash 0731, Inkling, Inkling Small, Kimi K3, OpenAI GPT 120B, GLM 5.2, and GLM 5.2 Fast support this parameter. Supported values vary by model: Lower values return faster responses with less thorough reasoning; higher values reason longer and cost more output tokens. reasoning_effort: "none" disables reasoning for every model in this table. Inkling and Inkling Small ignore chat_template_args: {"enable_thinking": false}. Kimi K3 supports both reasoning_effort: "none" and chat_template_args: {"enable_thinking": false}. GLM 5.2 and GLM 5.2 Fast return a 400 error for values outside their supported sets. Some model templates also read reasoning_effort from inside chat_template_args (GLM 5.2 honors both placements). Use the top-level parameter: the API validates it and returns a 400 for invalid values, but doesn’t validate chat_template_args contents, so mistakes there fail silently.
A successful request doesn’t mean reasoning_effort took effect. Models not listed in this table accept the parameter but ignore it.
Pass reasoning_effort through extra_body since it extends the standard OpenAI API:
reasoning_effort.py
Reasoning improves quality for tasks that benefit from step-by-step thinking: mathematical calculations, multi-step logic problems, code generation with complex requirements, and analysis requiring multiple considerations. For straightforward tasks like simple Q&A or text generation, reasoning adds latency and token cost without improving quality. In these cases, use a model without reasoning support or set reasoning_effort to low.

Parse the response

The model’s thinking process appears in reasoning_content, separate from the final answer in content. Both fields are returned on the message object.
Read reasoning_content and content directly off the message object:
parse_reasoning.py
The response body contains both fields on the assistant message:
Response
Reasoning tokens are included in completion_tokens and count toward your total usage and billing.

Next steps

Model APIs overview

Supported models, pricing, and the feature support matrix

Structured outputs

Constrain reasoning models to a JSON schema