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.
Please provide header value as 'Bearer ' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.
Request body for the Responses API.
ID of the model to use.
openai/gpt-oss-120bThe 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.
System prompt applied to the whole request, so it needs no message of its own.
Maximum number of tokens to generate, including reasoning and tool call tokens.
Sampling temperature. Higher values produce more random output.
Nucleus sampling probability mass. Must be greater than 0: a top_p of exactly 0 is rejected.
Penalise tokens that already appear in the text.
Penalise tokens based on their frequency in the text.
Number of most likely tokens to return log probabilities for.
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.
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.
Whether the model may request several tool calls at once.
trueUnique end-user identifier for abuse monitoring.
Successful operation
The request was rejected before it reached a model. The message names the field at fault.
The bearer token is missing, malformed or rejected.
The model is unknown, or is known but lacks the capability this endpoint needs.
The model understood the request and does not implement part of it. Retrying will not help; the same request may succeed against a different model.
Rate limit exceeded. This response carries no Retry-After header, so back off exponentially and watch X-RateLimit-Remaining-Requests on successful responses to slow down before reaching the limit. Limits are contract-specific.
The request failed on our side. It may or may not have been carried out, so a retry is safe for idempotent calls.
The platform is temporarily overloaded and is shedding load to stay stable. Retry after the number of seconds indicated by the Retry-After header. This is unrelated to your contract's rate limits.
An error not covered by the status codes above. The body carries the same shape as every other error, so branch on errorCode.
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?