Skip to main content
Some models on DeepInfra support extended chain-of-thought reasoning — the model “thinks through” a problem step by step before producing a final answer. By default, reasoning models produce a reasoning trace alongside the response. You can control this behavior with the reasoning_effort parameter.

Supported models

Reasoning is available on models that support chain-of-thought, including:
  • deepseek-ai/DeepSeek-R1
Check the model catalog for the latest list.

Controlling reasoning effort

Use reasoning_effort to control how much reasoning the model performs. Higher effort means deeper thinking but more output tokens and higher latency.

Disabling reasoning

Set reasoning_effort to "none" to disable chain-of-thought entirely. The model will respond directly without a reasoning trace — faster and cheaper.

The reasoning parameter

For more granular control, use the reasoning object instead of reasoning_effort:
Setting "enabled": false is equivalent to reasoning_effort: "none".

When to use reasoning

Supported parameters

Notes

  • Reasoning tokens count toward output token billing
  • Disabling reasoning on a reasoning model makes it behave like a standard chat model
  • reasoning_effort: "none" is equivalent to reasoning: { enabled: false }
  • Not all models support reasoning — using these parameters on a non-reasoning model has no effect

Chat Completions

Full chat completions API reference.

Streaming

Stream reasoning responses token by token.

Prompt Caching

Cache long prompts for faster reasoning.