Skip to main content
Some hosted models support extended thinking. The model generates reasoning tokens before its final answer and returns them in reasoning_content, separate from the final content.

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 the amount of reasoning a model performs. Supported values vary by model: Lower values reduce reasoning-token usage and latency. Higher values use more output tokens for reasoning. reasoning_effort: "none" disables reasoning for every model in this table except GLM 5.3 Flash, which doesn’t support none and cannot be disabled. Use low for minimal reasoning on GLM 5.3 Flash. 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 chat_template_args or chat_template_kwargs; GLM 5.2 and GLM 5.3 Flash accept either placement. Use the top-level parameter so the API can validate it. Invalid top-level values return 400, while invalid values inside chat_template_args can be ignored without an error.
A successful request does not confirm that 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
Use reasoning for mathematical calculations, multi-step logic, code generation with complex requirements, and analysis that requires several intermediate steps. For simple questions or text generation, reasoning adds latency and output tokens. Use a model without reasoning support or set reasoning_effort to low.

Parse the response

The message object returns reasoning in reasoning_content and the final answer in content.
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

Review supported models, pricing, and features.

Structured outputs

Constrain reasoning model output to a JSON schema.