inference.eu

POST /v1/responses

Responses API: the OpenAI Responses format, processed in the EU

The Responses endpoint is the newer of the two OpenAI-style generation APIs. It takes `instructions` and `input` instead of a message list, returns a list of typed output items, and is where built-in tools such as web search, code execution and remote MCP servers are configured. If you build agents with the OpenAI Agents SDK or start a new project, this is usually the endpoint to choose.

  1. 01API format: OpenAI
  2. 02EU data centres
  3. 03Covered by one DPA
POST /v1/responses
curl https://api.inference.eu/v1/responses \
  -H "Authorization: Bearer $INFERENCE_EU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-oss-120b",
    "instructions": "You are a support assistant for a Dutch logistics company. Answer in two short paragraphs.",
    "input": "A customer says their pallet was delivered to the wrong depot. What should I ask them first?",
    "max_output_tokens": 500,
    "reasoning": {"effort": "low"}
  }'

What the endpoint does

POST /v1/responses generates a model response from input, which can be a plain string or a list of input items: messages, images, earlier outputs and tool results. instructions holds the system prompt, kept apart from the user content so it is easy to change without rebuilding the input.

The output is not a single message but an output array. A simple answer contains one message item, while an agent turn can contain reasoning items, function calls, web search calls and MCP calls in the order they happened. The OpenAI SDKs expose a convenience property, output_text, that joins the text parts for you.

Key request fields

model and input are the only required fields. max_output_tokens caps the answer, including reasoning tokens on thinking models, and reasoning.effort (low, medium or high) sets how much a reasoning model thinks before it answers. temperature and top_p work as they do in chat completions.

tools takes your own functions plus built-in tool types such as web_search, code_interpreter and mcp. text.format asks for structured JSON that matches a schema. stream: true sends typed server-sent events such as response.output_text.delta, and previous_response_id continues an earlier turn without resending the whole history.

Conversation state and storage

With chat completions your code resends the whole history. With Responses you can pass previous_response_id and the API rebuilds the context from the stored earlier response. That keeps requests small in long agent loops and keeps reasoning items available between turns.

Stored responses are kept in the EU and are never used for training. If you prefer nothing to be kept, set store to false and send the full input each time, exactly as you would with chat completions. How long stored responses are retained depends on your contract, and we confirm it with you before you go live.

Errors and edge cases

Check status on every response. completed is the normal case. incomplete means generation stopped early, and incomplete_details.reason tells you whether it ran out of max_output_tokens. A failed response carries an error object. HTTP errors use the familiar shape: 400 for an invalid request, 401 for a bad key, 404 for an unknown model or response id, 429 when you reach a limit for your plan.

Do not assume the first output item is the text. Reasoning models put a reasoning item first, so iterate over output and pick items by type, or use output_text in the SDK.

Responses: common questions

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

Ask a question

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