Check out the newest way to compare different models for a task/agent harness: AutoEvals

API

Reasoning

Control how much a model thinks with reasoning_effort.

Reasoning models think through a problem before they answer. The reasoning_effort parameter controls how much thinking a model does. Higher effort improves quality on hard problems and uses more tokens and increases latency.

Set a reasoning effort

Pass reasoning_effort on a chat completion request:

TypeScript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.inference.net/v1",
  apiKey: process.env.INFERENCE_API_KEY,
});

const response = await client.chat.completions.create({
  model: "claude-opus-5",
  max_tokens: 20000,
  reasoning_effort: "high",
  messages: [{ role: "user", content: "Prove that sqrt(2) is irrational." }],
});

console.log(response.choices[0].message.content);

Effort levels

The full set of levels is none, minimal, low, medium, high, xhigh, and max. none disables reasoning. Each model supports a subset:

ModelSupported levels
gpt-5.2, gpt-5.4, gpt-5.5, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5-mini, gpt-5-nanonone, minimal, low, medium, high, xhigh
claude-fable-5, claude-opus-5, claude-opus-4-8, claude-opus-4-7, claude-haiku-4-5none, minimal, low, medium, high, xhigh, max
claude-opus-4-6, claude-sonnet-4-6none, minimal, low, medium, high, max
gemini-2.5-flash, gemini-2.5-flash-lite, gemini-3-flash-preview, gemini-3.1-flash-lite, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-3.6-flash, glm-5, glm-5.2, glm-5.2-fastnone, low, medium, high
glm-5.3-flash, kimi-k3none, low, high, max
gemini-2.5-prominimal, low, medium, high
gemini-3.1-pro-preview, gemini-3.7-flash, kimi-k2.5, kimi-k2.6, kimi-k3-fast, nemotron-3-super, qwen3-8b, qwen3-14b, qwen3-30b-a3b, qwen3-max-thinking, qwen3.7-pluslow, medium, high
glm-5.3low, high, max
deepseek-v4-flash, deepseek-v4-flash-0731, deepseek-v4-pro, deepseek-v4-pro-0813low, high, max
grok-4.5, grok-4.6low, medium, high

A model absent from this table (or from reasoning_efforts in GET /v1/models) has no first-party effort dial: the gateway forwards reasoning_effort for it, but the platform does not validate or guarantee behavior — several models accept the parameter and silently ignore it (gpt-4o, gpt-4.1).

You can also discover support programmatically. GET /v1/models returns context_length and max_completion_tokens when the platform knows them, and a reasoning_efforts array when the catalog declares the model's levels:

{
  "id": "claude-opus-5",
  "object": "model",
  "owned_by": "system",
  "context_length": 1000000,
  "max_completion_tokens": 128000,
  "reasoning_efforts": ["none", "minimal", "low", "medium", "high", "xhigh", "max"]
}

On OpenAI and Anthropic models, the API rejects an unsupported level before dispatch with a 400 that names the valid values. Other models forward the request, and the serving engine decides:

{
  "error": {
    "message": "reasoning_effort 'xhigh' is not supported by claude-sonnet-4-6. Supported: none, minimal, low, medium, high, max.",
    "type": "invalid_request_error",
    "param": "reasoning_effort",
    "code": "unsupported_value"
  }
}

gpt-4o and gpt-4.1 accept reasoning_effort and ignore it. They are not reasoning models, so usage.completion_tokens_details.reasoning_tokens is always 0.

Anthropic models: max_tokens must exceed the thinking budget

On Anthropic models, each effort level reserves a thinking budget, and that budget counts toward max_tokens. Your max_tokens (or max_completion_tokens) must be strictly greater than the budget for the level you request:

EffortThinking budget (tokens)
none0
minimal1,024
low1,024
medium2,048
high4,096
xhigh8,192
max16,384

For example, reasoning_effort: "xhigh" with max_tokens: 2000 fails, because the 8,192-token budget does not fit. The API rejects it with a 400 that names both numbers:

{
  "error": {
    "message": "max_tokens (2000) must be greater than the 8192-token thinking budget that reasoning_effort 'xhigh' enables on claude-haiku-4-5. Increase max_tokens or lower reasoning_effort.",
    "type": "invalid_request_error",
    "param": "max_tokens",
    "code": "invalid_value"
  }
}

Set max_tokens to the budget plus the visible output you want. max_tokens: 20000 leaves room for every level.

Do not send Anthropic's native thinking parameter to /v1/chat/completions. This endpoint does not map or validate it. Use reasoning_effort instead; the gateway maps it to a thinking budget for you.

Where reasoning appears in the response

Models differ in whether they return the reasoning text:

  • Anthropic models and glm-5.2 return the reasoning text in reasoning_content on the message.
  • OpenAI models do not return reasoning text. You only see the count in usage.completion_tokens_details.reasoning_tokens.
{
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "Assume sqrt(2) = a/b in lowest terms...",
        "reasoning_content": "The user wants a proof by contradiction..."
      }
    }
  ],
  "usage": {
    "completion_tokens_details": { "reasoning_tokens": 412 }
  }
}

Reasoning tokens bill at the model's reasoning rate when one is listed, otherwise at the model's output rate. See each model's page for rates.

Verbosity

The verbosity parameter (low, medium, or high) controls how long the visible answer is, independent of how much the model thinks. Only the gpt-5 family supports it.

{
  "model": "gpt-5.2",
  "reasoning_effort": "high",
  "verbosity": "low",
  "messages": [{ "role": "user", "content": "Summarize this contract." }]
}

Notes

  • reasoning: {"enabled": false} (the OpenRouter-style object) and reasoning_effort: "none" are accepted and translated to the model's native reasoning toggle before dispatch — for models that support one they disable reasoning. Callers that name their own external provider or bring their own key (x-inference-provider / provider API key headers) keep full control of the request vocabulary: their reasoning object is forwarded untouched. Pinning one of our own origins via x-inference-provider (e.g. inference-net) only selects routing and does not opt out of translation. An explicit reasoning_effort or chat_template_kwargs.enable_thinking always wins over the reasoning object.
  • reasoning_effort is validated first-party: an unsupported value returns a 400 naming the valid values instead of reaching the provider. Other keys outside the documented schema pass through to the upstream provider without validation — a typo in one of those fails at the provider, not at the gateway.

On this page