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

Create model response

Generate a model response, following a subset of the OpenAI Responses API wire format, if you prefer it over /v1/chat/completions. Both endpoints support tool calling.

Limitations:

  • store, background, conversation, and previous_response_id are not supported. A request that sets one is rejected with a 400 naming the field. Send the full conversation in input on every request, including any earlier function_call and function_call_output items, and keep each response if you need it later.

  • stream: true is not supported and is rejected with a 400. Send the request without stream to receive the complete response.

  • Only function tools are supported. Built-in tools (web_search, file_search, code_interpreter) are not available. The tool type is not checked: a tool without a name is rejected with a 400, and how a built-in tool with a name is answered is model-specific.

  • Support for tool_choice values is model-specific. A value the model does not support is rejected with a 422.

Fields that ResponsesRequest does not list are ignored, including fields the OpenAI Responses API defines, so check ResponsesRequest before relying on one.

Image input depends on the model: parts of type input_image are accepted for models advertising image input and rejected with a 400 for models 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 POST /v1/responses. A subset of the OpenAI Responses API. See the endpoint description for its limitations.

modelstringRequired

ID of the model to use.

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

Either a single text string (shorthand for a single user message), or an ordered list of input items: messages and, for multi-turn tool use, the function_call and function_call_output items from earlier turns.

stringOptional
or
instructionsstringOptional

System-level instructions prepended to the conversation as a developer message.

max_output_tokensinteger · min: 1Optional

Maximum number of tokens to generate, including reasoning and tool call tokens. When the output reaches it, status is incomplete and incomplete_details.reason is max_output_tokens.

temperaturenumber · max: 2Optional

Sampling temperature between 0 and 2.

top_pnumber · max: 1Optional

Nucleus sampling probability mass, greater than 0 and at most 1. A value outside that range, including exactly 0, is rejected with a 400.

presence_penaltynumber · min: -2 · max: 2Optional

Penalizes tokens that have already appeared, encouraging new topics.

frequency_penaltynumber · min: -2 · max: 2Optional

Penalizes tokens by how often they have appeared so far.

top_logprobsinteger · max: 20Optional

Number of most-likely tokens to return log probabilities for at each position.

stopone ofOptional

Up to 4 sequences where generation stops. The stop text is not included in the output. Same semantics as stop on /v1/chat/completions.

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

Controls which tool, if any, the model calls. none means no tool call, auto lets the model decide, and required forces a tool call. A named tool object forces a specific function.

Support for these values is model-specific. A value the model does not support is rejected with a 422.

string · enumOptionalPossible values:
or
parallel_tool_callsbooleanOptional

Whether to allow the model to call multiple tools in parallel. When omitted, the model chooses. Whether it is honored is model-specific.

userstringOptional

Opaque identifier for your end user.

streambooleanOptional

If true, stream partial results as Server-Sent Events. Not supported: a request with stream: true is rejected with a 400.

Default: false
storebooleanOptional

Whether to persist the response for later retrieval. Not supported: responses are not stored, so a request setting store: true is rejected with a 400.

backgroundbooleanOptional

Whether to run the request asynchronously. Not supported, because it requires store. A request setting background: true is rejected with a 400.

conversationstringOptional

Conversation this response belongs to. Not supported: a request that sets it is rejected with a 400. Send the full conversation in input instead.

previous_response_idstringOptional

Not supported. Responses are not stored, so a request containing this field is rejected with a 400. Send the full conversation in input instead.

Responses
200

Successful operation. Returns a completed ResponsesResponse.

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": "resp-abc123",
  "object": "response",
  "created_at": 1700000000,
  "status": "completed",
  "incomplete_details": null,
  "model": "openai/gpt-oss-120b",
  "output": [
    {
      "type": "function_call",
      "id": "fc-1",
      "status": "completed",
      "call_id": "call-1",
      "name": "get_weather",
      "arguments": "{\"city\":\"Berlin\"}"
    }
  ],
  "usage": {
    "input_tokens": 42,
    "output_tokens": 12,
    "total_tokens": 54
  }
}

Last updated

Was this helpful?