For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a model response

Generate a model response following a subset of the OpenAI Responses API. It takes a flat list of input items rather than a message array, and returns a list of typed output items rather than a single message, so the model's reasoning and its tool calls arrive as separate objects.

Not supported, and refused with a 400 naming the field: store, background, conversation, previous_response_id, and stream. Send the full conversation in input on every request, including any prior function_call and function_call_output items, and keep the response if you need it later.

Only function tools are available. Built-in tools such as web_search are not. tool_choice is answered by the model rather than here: auto and none work, while required and a named function are refused by the model with a 422.

Image input follows the model: content parts of type input_image are accepted for models advertising image input, and rejected with a 400 naming the models that do for those that do not.

post
Authorizations
AuthorizationstringRequired

Please provide header value as 'Bearer ' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.

Body

Request body for the Responses API.

modelstringRequired

ID of the model to use.

Example: openai/gpt-oss-120b
inputone ofRequired

The conversation. Either a plain string for a single user turn, or an array of items. An item with only role and content is treated as a message.

stringOptional
or
instructionsstringOptional

System prompt applied to the whole request, so it needs no message of its own.

max_output_tokensinteger · min: 1Optional

Maximum number of tokens to generate, including reasoning and tool call tokens.

temperaturenumber · max: 2Optional

Sampling temperature. Higher values produce more random output.

top_pnumber · max: 1Optional

Nucleus sampling probability mass. Must be greater than 0: a top_p of exactly 0 is rejected.

presence_penaltynumber · min: -2 · max: 2Optional

Penalise tokens that already appear in the text.

frequency_penaltynumber · min: -2 · max: 2Optional

Penalise tokens based on their frequency in the text.

top_logprobsinteger · max: 20Optional

Number of most likely tokens to return log probabilities for.

stopone ofOptional

Up to 4 sequences where generation stops. The stop text is not included in the output. Either a single sequence or an array of them, with the same semantics as stop on /v1/chat/completions.

stringOptional
or
string[] · max: 4Optional
tool_choiceone ofOptional

Controls whether a tool is called. none means no tool call, auto lets the model decide, required forces one, and a named tool object forces a specific function. Which of these a model honours is the model's own business: auto and none work everywhere, while required and a named function are refused by the model with a 422.

string · enumOptionalPossible values:
or
parallel_tool_callsbooleanOptional

Whether the model may request several tool calls at once.

Default: true
userstringOptional

Unique end-user identifier for abuse monitoring.

Responses
200

Successful operation

application/json
post/v1/responses
POST /v1/responses HTTP/1.1
Host: openai.inference.de-txl.ionos.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 73

{
  "model": "openai/gpt-oss-120b",
  "input": "Name three cities on the Rhine."
}
{
  "id": "text",
  "object": "response",
  "created_at": 1,
  "status": "completed",
  "model": "text",
  "output": [
    {
      "type": "message",
      "id": "text",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "text"
        }
      ],
      "summary": [
        {
          "type": "summary_text",
          "text": "text"
        }
      ],
      "call_id": "text",
      "name": "text",
      "arguments": "text"
    }
  ],
  "usage": {
    "input_tokens": 1,
    "output_tokens": 1,
    "total_tokens": 1
  },
  "error": {
    "code": "text",
    "message": "text"
  }
}

Last updated

Was this helpful?