---
title: "Reasoning models API · thinking models hosted in the EU"
description: "Use open reasoning models that think before they answer. Control reasoning effort, read reasoning tokens and handle limits, processed in EU data centres."
canonical: "https://inference.eu/api/reasoning/"
language: "en"
---

Guides · Reasoning models

# Reasoning models: open thinking models, processed in the EU

Reasoning models work through a problem step by step before they give an answer. They are slower and use more tokens than standard chat models, but they are much better at maths, multi-step planning, difficult code and questions where the first idea is often wrong. On the inference.eu API you control how much they think and see how many tokens the thinking used.

[Contact sales](https://inference.eu/contact/)[Example request](#example)

1.  01API format: OpenAI and Anthropic
2.  02EU data centres
3.  03Covered by one DPA

reasoning.py

```
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.inference.eu/v1", api_key=os.environ["INFERENCE_EU_API_KEY"])

response = client.responses.create(
    model="gpt-oss-120b",
    reasoning={"effort": "high"},
    max_output_tokens=8000,
    input=(
        "A warehouse ships 1,240 parcels a day. 3.5% are returned, and each return costs "
        "EUR 7.80 to process. A new packaging change cuts returns by a fifth but adds "
        "EUR 0.12 per parcel. Is the change worth it over a 250-day working year?"
    ),
)

print(response.output_text)
print("reasoning tokens:", response.usage.output_tokens_details.reasoning_tokens)
```

## How reasoning models work

When you send a request to a reasoning model such as `gpt-oss-120b`, the model first generates reasoning tokens, a private chain of thought in which it tries approaches, checks its work and corrects mistakes. Only then does it write the final answer. Both kinds of token are generated on our infrastructure in the EU, and both count as output tokens.

You use the same endpoints as for any other model: chat completions, Responses or Messages. The difference is in how you set limits and read the response. Reasoning helps most on problems with a verifiable answer; for simple rewriting or classification, a standard model is faster and cheaper.

## Controlling reasoning effort

In the Responses API, set `reasoning.effort` to `low`, `medium` or `high`. In chat completions, the equivalent field is `reasoning_effort`. Low effort gives quick answers with a short chain of thought; high effort lets the model think for longer on hard problems. Start with `medium` and change it per task based on measured quality.

Set `max_output_tokens` (or `max_tokens` in chat completions) generously, because the limit covers reasoning plus answer. A hard problem at high effort can use thousands of reasoning tokens before the first word of the answer. If the limit is too low, the response ends before the answer appears.

## Reading the response

In the Responses API, `output` contains a `reasoning` item followed by the `message` with the answer, and `output_text` gives you just the answer. `usage.output_tokens_details.reasoning_tokens` tells you how many tokens the thinking used, which is the number to watch for cost and speed.

Open models can return the text of their reasoning, which is useful for debugging prompts and for audit trails, but show it to end users with care: it can contain discarded ideas and false starts. When you continue a conversation with tool calls, pass reasoning items back with `previous_response_id` so the model keeps its train of thought. In chat completions, do not resend old reasoning as part of `content`.

## Errors and edge cases

The most common problem is an empty or incomplete answer caused by a token limit that is too low: in Responses the `status` is `incomplete`, in chat completions the `finish_reason` is `length`. Raise the limit or lower the effort.

Reasoning models take longer before the first visible token, so set client timeouts accordingly and stream if users are waiting. Some sampling settings, such as very high `temperature`, work against careful reasoning; leave them at their defaults unless you have a reason. Sending `reasoning_effort` to a model without reasoning support returns a 400 error or is ignored, depending on the model.

## Reasoning models

Category

Guides

API format

OpenAI and Anthropic

Base URL

api.inference.eu/v1

Processing

EU data centres

Training on your data

Never

## Reasoning models: common questions

The questions buyers, developers and legal teams ask us most. Something missing? Ask us directly.

A reasoning model generates a chain of thought before its final answer, working through the problem in steps and checking itself. That makes it more accurate on maths, logic, planning and difficult code, at the cost of more tokens and a longer wait. \`gpt-oss-120b\` is an open reasoning model on inference.eu.

In the Responses API, pass \`reasoning: {"effort": "low" | "medium" | "high"}\`. In chat completions, pass \`reasoning\_effort\` with the same values. Higher effort usually improves answers on hard problems but uses more tokens and takes longer. Test which level each task needs.

Reasoning tokens are output tokens, so they are counted in \`usage\` and billed like the rest of the answer. You can see them in \`usage.output\_tokens\_details.reasoning\_tokens\` in the Responses API. Lower the effort for tasks that do not need deep thinking.

Open reasoning models can return their reasoning text as a \`reasoning\` item in the Responses API. It is useful for debugging and review. Treat it as a working draft, not an explanation to show customers, because it can include ideas the model later rejected.

The model probably used up the token limit while reasoning. Check \`status\` and \`incomplete\_details\` in Responses, or \`finish\_reason\` in chat completions. Raise \`max\_output\_tokens\` or \`max\_tokens\`, or lower the reasoning effort, and send the request again.

For simple, high-volume tasks: summarising, rewriting, classification, short extraction or chat small talk. A standard chat model answers faster and with fewer tokens, and reasoning adds little. Use reasoning models where mistakes are costly and the problem has several steps.

Yes. Reasoning models can plan which tools to call, call them, and reason about the results. In the Responses API, keep the reasoning items between turns with \`previous\_response\_id\`, so the model does not have to work out its plan again after each tool result.

Yes. Streaming works as with any other model. You receive reasoning events first, if the model returns them, and then the answer as text deltas. Show a progress indicator during the reasoning phase so users know the model is working.

[Ask a question](https://inference.eu/contact/)

## Related

[API overview](https://inference.eu/api/)

-   [ResponsesUse the OpenAI Responses API format with open-weight models on inference.eu. Typed output items, built-in tools and multi-turn state, processed in the EU.Endpoints](https://inference.eu/api/responses/)
-   [Chat completionsSend chat messages to open-weight models with the OpenAI chat completions format. Requests are processed in EU data centres and never used for training.Endpoints](https://inference.eu/api/chat-completions/)
-   [Structured outputsGet valid JSON that matches your schema from open models with OpenAI-compatible structured outputs. JSON mode, json\_schema, strict mode and pitfalls.Guides](https://inference.eu/api/structured-outputs/)
-   [Tool callingLet open models call your functions and APIs with OpenAI-compatible tool calling. Define tools, run the loop, handle arguments, processed in the EU.Guides](https://inference.eu/api/tool-calling/)

## Move your AI workloads to EU infrastructure

Tell us which models you use and roughly how much traffic you have. We reply within one working day with pricing and next steps.

-   Reply within one working day
-   Pricing for your volume
-   DPA ready to sign
