> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/api-reference/ai/ai-model-hub/responses/create-model-response.md).

# 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.

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"tags":[{"name":"Responses","description":"Generate model responses following a subset of the OpenAI Responses API, if you prefer\nits wire format. Both `/v1/responses` and `/v1/chat/completions` support tool calling.\n"}],"servers":[{"url":"https://openai.inference.de-txl.ionos.com","description":"Berlin"}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Please provide header value as 'Bearer <token>' and don't forget\nto add 'Bearer' HTTP Authorization Scheme before the token.\n"}},"schemas":{"ResponsesRequest":{"type":"object","description":"Request body for `POST /v1/responses`. A subset of the OpenAI Responses API. See the\nendpoint description for its limitations.\n","properties":{"model":{"type":"string","description":"ID of the model to use."},"input":{"description":"Either a single text string (shorthand for a single user message), or an ordered\nlist of input items: messages and, for multi-turn tool use, the `function_call` and\n`function_call_output` items from earlier turns.\n","oneOf":[{"type":"string"},{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/ResponsesInputItem"}}]},"instructions":{"type":"string","description":"System-level instructions prepended to the conversation as a developer message."},"max_output_tokens":{"type":"integer","description":"Maximum number of tokens to generate, including reasoning and tool call tokens.\nWhen the output reaches it, `status` is `incomplete` and `incomplete_details.reason`\nis `max_output_tokens`.\n","minimum":1},"temperature":{"description":"Sampling temperature between 0 and 2.","type":"number","minimum":0,"maximum":2},"top_p":{"description":"Nucleus sampling probability mass, greater than 0 and at most 1. A value outside\nthat range, including exactly 0, is rejected with a 400.\n","type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1},"presence_penalty":{"description":"Penalizes tokens that have already appeared, encouraging new topics.","type":"number","minimum":-2,"maximum":2},"frequency_penalty":{"description":"Penalizes tokens by how often they have appeared so far.","type":"number","minimum":-2,"maximum":2},"top_logprobs":{"description":"Number of most-likely tokens to return log probabilities for at each position.","type":"integer","minimum":0,"maximum":20},"stop":{"description":"Up to 4 sequences where generation stops. The stop text is not included in the\noutput. Same semantics as `stop` on `/v1/chat/completions`.\n","oneOf":[{"type":"string"},{"type":"array","maxItems":4,"items":{"type":"string"}}]},"text":{"$ref":"#/components/schemas/ResponsesTextConfig"},"reasoning":{"$ref":"#/components/schemas/ResponsesReasoningConfig"},"tools":{"type":"array","description":"List of tools the model may call.","items":{"$ref":"#/components/schemas/ResponsesTool"}},"tool_choice":{"description":"Controls which tool, if any, the model calls. `none` means no tool call, `auto` lets\nthe model decide, and `required` forces a tool call. A named tool object forces a\nspecific function.\n\nSupport for these values is model-specific. A value the model does not support is\nrejected with a 422.\n","oneOf":[{"type":"string","enum":["none","auto","required"]},{"$ref":"#/components/schemas/ResponsesNamedToolChoice"}]},"parallel_tool_calls":{"description":"Whether to allow the model to call multiple tools in parallel. When omitted, the\nmodel chooses. Whether it is honored is model-specific.\n","type":"boolean"},"user":{"type":"string","description":"Opaque identifier for your end user."},"stream":{"type":"boolean","description":"If true, stream partial results as Server-Sent Events. Not supported: a request with\n`stream: true` is rejected with a 400.\n","default":false},"store":{"type":"boolean","description":"Whether to persist the response for later retrieval. Not supported: responses are\nnot stored, so a request setting `store: true` is rejected with a 400.\n"},"background":{"type":"boolean","description":"Whether to run the request asynchronously. Not supported, because it requires\n`store`. A request setting `background: true` is rejected with a 400.\n"},"conversation":{"type":"string","description":"Conversation this response belongs to. Not supported: a request that sets it is\nrejected with a 400. Send the full conversation in `input` instead.\n"},"previous_response_id":{"type":"string","description":"Not supported. Responses are not stored, so a request containing this field is\nrejected with a 400. Send the full conversation in `input` instead.\n"}},"required":["model","input"]},"ResponsesInputItem":{"type":"object","description":"A single item in the `input` array: a conversation message or, for multi-turn tool\nuse, an earlier tool call or its result. Which fields apply depends on `type`.\n","properties":{"type":{"type":"string","enum":["message","function_call","function_call_output"],"default":"message","description":"Discriminator for the item type. Optional: when omitted the item is treated as a\n`message`, matching OpenAI, whose `EasyInputMessage` requires only `role` and\n`content`. This is the shape the OpenAI SDKs emit by default.\n"},"role":{"description":"Message author. Required when `type` is `message`. The value is not checked, and\nhow a value outside this list is answered is model-specific.\n","type":"string","enum":["system","developer","user","assistant"]},"content":{"description":"Content of the message. Required when `type` is `message`. Either a plain string,\nor an ordered array of content parts for multi-modal input.\n\nThe Responses API uses its own part names (`input_text`, `input_image`), distinct\nfrom the Chat Completions part names `text` and `image_url`. There is no video part:\nthis API defines only text and image content, so video input is available on\n`/v1/chat/completions` and `/v1/embeddings` instead.\n\nImage parts are only accepted on `user` messages, and only for models advertising\nimage input. For other models, the request is rejected with a 400 naming the\nmodels that support it.\n","oneOf":[{"type":"string"},{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/ResponsesContentPart"}}]},"call_id":{"type":"string","description":"Identifier correlating a `function_call` with its `function_call_output`. Required\nwhen `type` is `function_call` or `function_call_output`.\n"},"name":{"type":"string","description":"Name of the called function. Required when `type` is `function_call`."},"arguments":{"type":"string","description":"JSON-encoded arguments the model produced for the call. Required when `type` is\n`function_call`.\n"},"output":{"type":"string","description":"The tool's result, as a string. Required when `type` is `function_call_output`.\n"}}},"ResponsesContentPart":{"type":"object","description":"A single content part of a Responses message: text or an image reference. The\n`type` values and the flat `image_url` string differ from the Chat Completions\ncontent part shape.\n","properties":{"type":{"description":"Discriminator for the content type.","type":"string","enum":["input_text","input_image"]},"text":{"description":"Text content when `type` is `input_text`.","type":"string"},"image_url":{"description":"Image reference when `type` is `input_image`. Either a public HTTP or HTTPS URL,\nwhich must be reachable from the internet, or an inline base64 data URI\n(`data:image/...;base64,...`) of at most 12 MiB decoded. Unlike Chat Completions,\nthis is a plain string, not an object with a `url` key.\n","type":"string"},"detail":{"description":"Fidelity hint for image processing. When omitted, the model chooses. Its effect,\nand how a value outside this list is answered, are model-specific.\n","type":"string","enum":["auto","low","high"]}},"required":["type"]},"ResponsesTextConfig":{"type":"object","description":"Configuration for the model's text output, including structured outputs. This is the\nResponses API's equivalent of `response_format` on `/v1/chat/completions`.\n","properties":{"format":{"$ref":"#/components/schemas/ResponsesTextFormat"}}},"ResponsesTextFormat":{"type":"object","description":"Output format. `text` is free-form prose. `json_object` constrains the reply to valid\nJSON. `json_schema` constrains it to the supplied schema, which is the form worth\nreaching for: it is the only one that guarantees a parseable shape.\n","properties":{"type":{"description":"The output format.","type":"string","enum":["text","json_object","json_schema"]},"name":{"description":"Name of the response format. Required when `type` is `json_schema`. OpenAI allows\nup to 64 characters. The length limit applied is model-specific.\n","type":"string"},"schema":{"description":"The JSON Schema the output must conform to. Required when `type` is `json_schema`.","type":"object","additionalProperties":true},"strict":{"description":"Whether to enforce the schema exactly. Whether it is honored, and its default when\nomitted, are model-specific.\n","type":"boolean"},"description":{"description":"What the format is for, used by the model to decide how to respond.","type":"string"}},"required":["type"]},"ResponsesReasoningConfig":{"type":"object","description":"Controls how much reasoning a reasoning-capable model does before answering. This is the Responses API's own shape. `/v1/chat/completions` takes the same control as a flat `reasoning_effort` string. Accepted values are model-specific, and a value the model does not accept is rejected. Keys other than `effort` and `summary` are ignored.","properties":{"effort":{"description":"How much reasoning to do before answering. Accepted values are model-specific.","type":"string"},"summary":{"description":"Whether, and how verbosely, to summarize the reasoning. Accepted values are\nmodel-specific.\n","type":"string"}}},"ResponsesTool":{"type":"object","description":"A tool the model may call. Unlike Chat Completions, the function definition is\nflattened directly onto the tool object rather than nested under a `function` key.\n","properties":{"type":{"description":"Always `function`. Built-in tool types are not available, and how one is answered\nis model-specific.\n","type":"string","enum":["function"]},"name":{"description":"The name of the function to call.","type":"string"},"description":{"description":"Description of what the function does.","type":"string"},"parameters":{"type":"object","description":"The parameters the function accepts, described as a JSON Schema object.","additionalProperties":true},"strict":{"description":"Whether to enforce strict schema adherence when generating arguments. Whether it is\nhonored is model-specific.\n","type":"boolean"}},"required":["type","name"]},"ResponsesNamedToolChoice":{"type":"object","description":"Forces the model to call a specific function.","properties":{"type":{"type":"string","enum":["function"]},"name":{"description":"The name of the function to call.","type":"string"}},"required":["type","name"]},"ResponsesResponse":{"type":"object","description":"Response body for a `POST /v1/responses` request. Always synchronous, never streamed.","properties":{"id":{"description":"Unique identifier for this response.","type":"string"},"object":{"description":"Always `response`.","type":"string"},"created_at":{"type":"integer","description":"Unix timestamp of when the response was created."},"status":{"type":"string","enum":["completed","failed","incomplete"],"description":"Final status of the response."},"model":{"description":"Model used to generate the response.","type":"string"},"output":{"type":"array","description":"List of generated output items, in order.","items":{"$ref":"#/components/schemas/ResponsesOutputItem"}},"usage":{"$ref":"#/components/schemas/ResponsesUsage"},"error":{"description":"Error details, present when `status` is `failed`.","nullable":true,"allOf":[{"$ref":"#/components/schemas/ResponsesResponseError"}]},"incomplete_details":{"description":"Why the response is incomplete. Null unless `status` is `incomplete`.","nullable":true,"allOf":[{"$ref":"#/components/schemas/ResponsesIncompleteDetails"}]}},"required":["id","object","created_at","status","incomplete_details","model","output"]},"ResponsesOutputItem":{"type":"object","description":"A single generated output item. Which fields apply depends on `type`.","properties":{"type":{"description":"Discriminator for the item type.","type":"string","enum":["message","function_call","reasoning"]},"id":{"description":"Unique identifier for this output item.","type":"string"},"status":{"description":"Whether generating this item completed.","type":"string","enum":["completed","incomplete"]},"role":{"type":"string","enum":["assistant"],"description":"Present when `type` is `message`. Always `assistant`."},"content":{"type":"array","description":"Present when `type` is `message` (parts of type `output_text`) or `reasoning`\n(parts of type `reasoning_text`, the model's own reasoning trace).\n","items":{"$ref":"#/components/schemas/ResponsesOutputContent"}},"summary":{"type":"array","description":"Present when `type` is `reasoning`. A condensed form of the reasoning trace, when\nthe model produces one. Models that emit reasoning without a summary return an\nempty array.\n","items":{"$ref":"#/components/schemas/ResponsesSummaryContent"}},"call_id":{"type":"string","description":"Present when `type` is `function_call`. Correlates with a follow-up `function_call_output`."},"name":{"type":"string","description":"Present when `type` is `function_call`. Name of the called function."},"arguments":{"type":"string","description":"Present when `type` is `function_call`. JSON-encoded arguments."}},"required":["type"]},"ResponsesOutputContent":{"type":"object","description":"A single piece of output content, which is always text.\n\n`output_text` is the answer itself. `reasoning_text` is the model's reasoning trace,\ncarried on items of type `reasoning`.\n","properties":{"type":{"type":"string","enum":["output_text","reasoning_text"]},"text":{"description":"The generated text.","type":"string"}},"required":["type","text"]},"ResponsesSummaryContent":{"type":"object","description":"A single piece of reasoning summary content.","properties":{"type":{"type":"string","enum":["summary_text"]},"text":{"description":"The summary text.","type":"string"}},"required":["type","text"]},"ResponsesUsage":{"type":"object","description":"Token usage for the response.","properties":{"input_tokens":{"type":"integer","description":"Number of tokens in the input."},"output_tokens":{"type":"integer","description":"Number of tokens generated."},"total_tokens":{"type":"integer","description":"Total tokens consumed by the request."},"output_tokens_details":{"$ref":"#/components/schemas/ResponsesOutputTokensDetails"}}},"ResponsesOutputTokensDetails":{"type":"object","description":"Breakdown of `output_tokens`, present when the model reports one.","properties":{"reasoning_tokens":{"type":"integer","description":"Tokens the model spent reasoning. They are already counted in `output_tokens`."}}},"ResponsesResponseError":{"type":"object","description":"Present when `status` is `failed`.","properties":{"code":{"description":"Machine-readable error code.","type":"string"},"message":{"description":"Human-readable explanation of the failure.","type":"string"}}},"ResponsesIncompleteDetails":{"type":"object","description":"Why the response is incomplete.","required":["reason"],"properties":{"reason":{"type":"string","description":"`max_output_tokens` when the output reaches `max_output_tokens` before it is\nfinished.\n","enum":["max_output_tokens","content_filter"]}}},"Error":{"type":"object","description":"Error response.","properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation as specified by RFC 7231."},"messages":{"type":"array","description":"List of error messages.","items":{"type":"object","properties":{"errorCode":{"type":"string","description":"Stable, machine-readable classification of the failure. Branch on this\nrather than on `message`, which is meant for humans and may be reworded.\n\nClient errors, safe to act on:\n\n- `VALIDATION_ERROR` (400) a field is missing, malformed or out of the\n  documented range. The message names the field.\n- `INVALID_JSON` (400) the body is not valid JSON.\n- `INVALID_MULTIPART` (400) the multipart form could not be parsed.\n- `INVALID_TOKEN` (401) the `Authorization` header is larger than 8 KiB.\n  Every other 401 carries one of the authentication codes instead:\n  `paas-auth-1` (the `Authorization` header is missing or does not hold a\n  `Bearer` token), `paas-token-1` (the token was not accepted) or\n  `paas-auth-2` (the token could not be verified as a customer token).\n- `INSUFFICIENT_PRIVILEGES` (403) the token is valid but its contract\n  lacks the privilege required to use this API.\n- `MODEL_NOT_SUPPORTED` (404) the model is unknown. A known model that lacks\n  the capability this endpoint or request needs is rejected with a 400\n  `VALIDATION_ERROR` naming the models that have it.\n- `ROUTE_NOT_FOUND` (404) no endpoint exists at the requested path.\n- `METHOD_NOT_ALLOWED` (405) the endpoint exists but does not accept the\n  HTTP method used.\n- `RESOURCE_LIMIT_ERROR` (413) the request exceeds a documented size or\n  count limit.\n- `RATE_LIMIT_EXCEEDED` (429) the contract's rate limit is exhausted.\n  Wait the number of seconds in `Retry-After` before retrying.\n- `SERVICE_OVERLOADED` (503) too many large requests are already being\n  handled at once. Applies only above a size threshold, or to a request\n  sent with chunked transfer encoding. An ordinary request is never\n  refused this way. Retry after the interval in `Retry-After`.\n- `CLIENT_DISCONNECTED` (499) you closed the connection before the\n  response was ready. You never receive this code, since the connection\n  is already gone. It identifies the request in usage records. Tokens\n  generated before the disconnect are still billed.\n\nThe model refused or could not be reached:\n\n- `UPSTREAM_REJECTED` the model rejected the request. The status is the\n  one it returned, and the message carries its explanation. Usually a 4xx\n  and usually worth fixing rather than retrying. An image or video URL in\n  the request that answers with a client error, such as 404, comes back\n  as 422 with this code: check that the URL exists and is publicly\n  reachable.\n- `UPSTREAM_NOT_IMPLEMENTED` (422) the model understood the request and\n  does not implement part of it. Retrying does not help. The same request\n  may succeed against a different model.\n- `UPSTREAM_UNAVAILABLE` (502) the model could not be reached, or stopped\n  before it finished answering. Retrying is reasonable. A partial answer\n  is never returned in its place, and nothing is billed for it. An image or\n  video URL whose host cannot be reached, times out or answers with a\n  server error comes back this way too.\n- `UPSTREAM_TIMEOUT` (504) the model did not answer within the time allowed\n  for it. The work may have been too expensive:\n  prefer a smaller request or a different model over retrying the same\n  one unchanged.\n\nAn internal error occurred (500). The code identifies where it happened\nand is not a contract to branch on. Treat these alike:\n`CHAT_COMPLETION_ERROR`, `COMPLETION_ERROR`, `EMBEDDING_ERROR`,\n`IMAGE_ERROR`, `RERANK_ERROR`, `RESPONSES_ERROR`, `TRANSCRIPTION_ERROR`,\n`CONVERSION_ERROR`.\n\nNew codes may be added, so treat an unrecognized value as a generic\nfailure of its HTTP status class rather than rejecting the response.\n"},"message":{"type":"string","description":"Human-readable explanation, intended for logs and for showing to a\ndeveloper. Wording may change between releases, so branch on `errorCode`.\n"}},"additionalProperties":false}}},"required":["httpStatus","messages"],"additionalProperties":false},"OpenAIError":{"type":"object","description":"OpenAI-compatible error response.","required":["error"],"properties":{"error":{"type":"object","description":"The error details.","required":["message","type"],"properties":{"message":{"type":"string","description":"Human-readable explanation of the error."},"type":{"type":"string","description":"Error category, for example `invalid_request_error`."},"code":{"type":"string","description":"Machine-readable sub-classification of `type`. Used by the 529 overload\nresponse to distinguish a per-user throttle (`user_overloaded`) from a\nsystem-wide capacity shortage (`server_overloaded`), so you do not have to\nparse the `message` text.\n"}}}}}},"headers":{"X-RateLimit-Limit-Requests":{"description":"How many requests per interval your contract's rate limit allows for this\nrequest. The value, and the length of the interval, depend on your contract.\nAbsent when no rate-limit check ran, for example on a request refused for a\nmalformed body.\n","schema":{"type":"integer"}},"X-RateLimit-Remaining-Requests":{"description":"How many of those requests are still unused. It counts down from\n`X-RateLimit-Limit-Requests`, never exceeds it, and refills continuously over the\ninterval. Once it reaches 0, slow down: further requests may be refused with a\n429 until it refills. Absent when no rate-limit check ran.\n","schema":{"type":"integer"}},"X-Request-Id":{"description":"Identifier for this request. Quote it when reporting a problem to support.","schema":{"type":"string"}},"X-Gateway-Version":{"description":"Build version of the API that served the response.","schema":{"type":"string"}},"X-RateLimit-Reset-Requests":{"description":"The time until the rate limit is back at its initial state, with\n`X-RateLimit-Remaining-Requests` equal to the limit again, as a duration such as\n`200ms`, `1.5s` or `6m0s`. Requests refill gradually, so the remaining count\nrises well before then. Absent when no rate-limit check ran.\n","schema":{"type":"string"}}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request sent to the API was malformed.\n","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-Gateway-Version":{"$ref":"#/components/headers/X-Gateway-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"### Unauthorized\nThe request is missing authorization information or the authorization information provided are expired.\n","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-Gateway-Version":{"$ref":"#/components/headers/X-Gateway-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"### Forbidden\nThe user issuing the request does not have the needed permissions.\n","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-Gateway-Version":{"$ref":"#/components/headers/X-Gateway-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"### Not Found\nThe requested model or endpoint does not exist. A model that exists but lacks the\ncapability the request needs is rejected with a 400 instead.\n","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-Gateway-Version":{"$ref":"#/components/headers/X-Gateway-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PayloadTooLarge":{"description":"### Payload Too Large\nThe request exceeds a size limit. The request body is limited to 16 MiB, an inline\nbase64 data URI to 12 MiB decoded, and an uploaded image or mask to 10 MiB. On\n`/v1/chat/completions`, `/v1/embeddings`, and `/v1/rerank`, a message, query, or\ndocument is limited to 2048 content parts. Count limits, such as the number of\ndocuments, are stated with each field. Pass large media as a remote HTTP or HTTPS URL\ninstead of inline base64: a URL does not count against the size limits, though it\nstill counts as a content part.\n","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-Gateway-Version":{"$ref":"#/components/headers/X-Gateway-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnprocessableEntity":{"description":"### Unprocessable Entity\nThe request was well-formed but contains semantic errors.\n","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-Gateway-Version":{"$ref":"#/components/headers/X-Gateway-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"### Too Many Requests\nYour contract's rate limit is exhausted. Wait the number of seconds in `Retry-After`\nbefore retrying, rather than a delay of your own. The OpenAI SDKs do this\nautomatically. Limits are contract-specific.\n","headers":{"X-RateLimit-Limit-Requests":{"$ref":"#/components/headers/X-RateLimit-Limit-Requests"},"X-RateLimit-Remaining-Requests":{"$ref":"#/components/headers/X-RateLimit-Remaining-Requests"},"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-Gateway-Version":{"$ref":"#/components/headers/X-Gateway-Version"},"Retry-After":{"description":"Seconds to wait before retrying. Other requests under your contract count\nagainst the same limit, so a retry can still be refused.\n","schema":{"type":"integer"}},"X-RateLimit-Reset-Requests":{"$ref":"#/components/headers/X-RateLimit-Reset-Requests"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nThe request could not be completed because of an internal error. The request was\nnot necessarily rejected, so a retry is safe for idempotent calls. If it persists,\nquote the value of the `X-Request-Id` response header when contacting support.\n","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-Gateway-Version":{"$ref":"#/components/headers/X-Gateway-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BadGateway":{"description":"### Bad Gateway\nThe model could not be reached, or stopped before it finished answering. No partial\nanswer is returned in its place, and nothing is billed for it. Retrying is\nreasonable. An image or video URL in the request whose host cannot be reached,\ntimes out or answers with a server error is also answered this way.\n","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-Gateway-Version":{"$ref":"#/components/headers/X-Gateway-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceOverloaded":{"description":"### Service Overloaded (503)\nToo many large requests are already being handled at once. This applies only\nto a request above a size threshold, or one sent with chunked transfer\nencoding. An ordinary-sized request is never refused this way. Always retry\nusing the `Retry-After` header, not a fixed delay, to avoid a synchronized\nretry storm. For sustained traffic in media, keep individual requests small:\npass large media in a JSON body as a remote HTTP or HTTPS URL rather than\ninline base64, and keep a file upload small, for example by sending audio in\na compressed format such as MP3 or Opus. The message gives the advice that\nfits how the request was sent.\n","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-Gateway-Version":{"$ref":"#/components/headers/X-Gateway-Version"},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"GatewayTimeout":{"description":"### Gateway Timeout\nThe model did not answer within the time allowed for it. The request may\nhave reached the model and may even have been served, so a retry is only safe for\nidempotent calls. Retrying the same request unchanged tends to time out again: the\nwork itself is usually what was too slow, so prefer a smaller request (fewer or\nsmaller images, a shorter prompt, a lower `n`) or a model that can serve it.\n","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-Gateway-Version":{"$ref":"#/components/headers/X-Gateway-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Overloaded":{"description":"### Capacity Exhausted (529)\nThe service is temporarily overloaded. This is a non-standard status,\nmatching the convention used by other LLM providers for the same\ncondition: capacity is exhausted, not a client error (429) and not an\noutage (503). `error.code` distinguishes a per-user throttle\n(`user_overloaded`) from a system-wide capacity shortage\n(`server_overloaded`). If you check only the status, treat both\nalike. Always retry using the `Retry-After` header, not a\nfixed delay, to avoid a synchronized retry storm.\n","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-Gateway-Version":{"$ref":"#/components/headers/X-Gateway-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}}}},"paths":{"/v1/responses":{"post":{"operationId":"v1ResponsesPost","summary":"Create model response","description":"Generate a model response, following a subset of the OpenAI Responses API wire format,\nif you prefer it over `/v1/chat/completions`. Both endpoints support tool calling.\n\nLimitations:\n\n- `store`, `background`, `conversation`, and `previous_response_id` are not supported.\n  A request that sets one is rejected with a 400 naming the field. Send the full\n  conversation in `input` on every request, including any earlier `function_call` and\n  `function_call_output` items, and keep each response if you need it later.\n- `stream: true` is not supported and is rejected with a 400. Send the request without\n  `stream` to receive the complete response.\n- Only `function` tools are supported. Built-in tools (`web_search`, `file_search`,\n  `code_interpreter`) are not available. The tool `type` is not checked: a tool without\n  a `name` is rejected with a 400, and how a built-in tool with a `name` is answered is\n  model-specific.\n- Support for `tool_choice` values is model-specific. A value the model does not\n  support is rejected with a 422.\n\nFields that `ResponsesRequest` does not list are ignored, including fields the OpenAI\nResponses API defines, so check `ResponsesRequest` before relying on one.\n\nImage input depends on the model: parts of type `input_image` are accepted for models\nadvertising image input and rejected with a 400 for models that do not.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsesRequest"}}}},"responses":{"200":{"description":"Successful operation. Returns a completed `ResponsesResponse`.","headers":{"X-RateLimit-Limit-Requests":{"$ref":"#/components/headers/X-RateLimit-Limit-Requests"},"X-RateLimit-Remaining-Requests":{"$ref":"#/components/headers/X-RateLimit-Remaining-Requests"},"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-Gateway-Version":{"$ref":"#/components/headers/X-Gateway-Version"},"X-RateLimit-Reset-Requests":{"$ref":"#/components/headers/X-RateLimit-Reset-Requests"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsesResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/BadGateway"},"503":{"$ref":"#/components/responses/ServiceOverloaded"},"504":{"$ref":"#/components/responses/GatewayTimeout"},"529":{"$ref":"#/components/responses/Overloaded"}},"tags":["Responses"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ionos.com/cloud/api-reference/ai/ai-model-hub/responses/create-model-response.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
