> 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/models.md).

# Models

## The CompletionRequest object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"CompletionRequest":{"type":"object","properties":{"model":{"type":"string","description":"ID of the model to use"},"prompt":{"type":"string","description":"The prompt to generate completions from"},"temperature":{"type":"number","description":"The sampling temperature to be used"},"top_p":{"type":"number","description":"An alternative to sampling with temperature"},"n":{"type":"integer","description":"The number of chat completion choices to generate for each input message"},"stream":{"type":"boolean","description":"If set to true, it sends partial message deltas"},"stop":{"type":"array","items":{"type":"string"},"description":"Up to 4 sequences where the API will stop generating further tokens"},"max_tokens":{"type":"integer","description":"The maximum number of tokens to generate in the chat completion"},"presence_penalty":{"type":"number","description":"It is used to penalize new tokens based on their existence in the text so far"},"frequency_penalty":{"type":"number","description":"It is used to penalize new tokens based on their frequency in the text so far"},"logit_bias":{"type":"object","description":"Used to modify the probability of specific tokens appearing in the completion"},"user":{"type":"string","description":"A unique identifier representing your end-user"},"stream_options":{"type":"object","description":"Options for streaming responses","properties":{"include_usage":{"type":"boolean","description":"Whether to include usage information in streamed responses","default":true}}}},"required":["model","prompt"]}}}}
```

## The SuccessfulCompletionResponse object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"SuccessfulCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"type":"string"},"index":{"type":"integer"},"text":{"type":"string"}}}},"created":{"type":"integer"},"object":{"type":"string"},"model":{"type":"string"},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}}}}}}}
```

## The ChatCompletionRequest object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"ChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string","description":"ID of the model to use"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatCompletionMessage"}},"response_format":{"description":"An object specifying the format that the model must output. Use json_object for JSON mode or json_schema to enforce a specific schema (Structured Outputs). If omitted, default text output is used.\n","oneOf":[{"$ref":"#/components/schemas/ResponseFormatJSONSchema"},{"$ref":"#/components/schemas/ResponseFormatJSONObject"},{"$ref":"#/components/schemas/ResponseFormatText"}]},"temperature":{"type":"number","description":"The sampling temperature to be used","default":1},"top_p":{"type":"number","description":"An alternative to sampling with temperature","default":-1},"n":{"type":"integer","description":"The number of chat completion choices to generate for each input message","default":1},"stream":{"default":false,"type":"boolean","description":"If set to true, it sends partial message deltas"},"stop":{"type":"array","items":{"type":"string"},"description":"Up to 4 sequences where the API will stop generating further tokens"},"max_tokens":{"type":"integer","description":"The maximum number of tokens to generate in the chat. This value is now deprecated in favor of max_completion_tokens completion","default":16,"deprecated":true},"max_completion_tokens":{"type":"integer","description":"An upper bound for the number of tokens that can be generated for a completion, including visible output tokens","default":16},"presence_penalty":{"type":"number","description":"It is used to penalize new tokens based on their existence in the text so far","default":0},"frequency_penalty":{"type":"number","description":"It is used to penalize new tokens based on their frequency in the text so far","default":0},"logit_bias":{"type":"object","description":"Used to modify the probability of specific tokens appearing in the completion"},"logprobs":{"type":"boolean","description":"Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.","default":false},"top_logprobs":{"type":"integer","description":"An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.","minimum":0,"maximum":20},"user":{"type":"string","description":"A unique identifier representing your end-user"},"reasoning_effort":{"type":"string","enum":["low","medium","high"],"default":"medium","description":"OpenAI-compatible field that controls the model's reasoning token\nbudget. Supported values are `low`, `medium`, and `high`.\n"},"tools":{"type":"array","description":"A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.\n","items":{"$ref":"#/components/schemas/chatCompletionTool"}},"tool_choice":{"$ref":"#/components/schemas/chatCompletionToolChoiceOption"},"stream_options":{"type":"object","description":"Options for streaming responses","properties":{"include_usage":{"type":"boolean","description":"Whether to include usage information in streamed responses","default":true}}}},"required":["model","messages"]},"ChatCompletionMessage":{"type":"object","description":"A message in a chat completion request, supporting both text-only and multimodal content","properties":{"role":{"type":"string","description":"The role of the message's author","enum":["system","user","assistant","tool"]},"content":{"oneOf":[{"type":"string","description":"Text content of the message (legacy format)"},{"type":"array","description":"Array of content parts for multimodal messages","items":{"$ref":"#/components/schemas/ChatCompletionContentPart"}}]},"name":{"type":"string","description":"The name of the author of the message"},"tool_calls":{"type":"array","description":"Tool calls generated by the model","items":{"$ref":"#/components/schemas/chatCompletionMessageToolCall"}},"tool_call_id":{"type":"string","description":"Tool call that this message is responding to"}},"required":["role","content"]},"ChatCompletionContentPart":{"oneOf":[{"$ref":"#/components/schemas/ChatCompletionContentPartText"},{"$ref":"#/components/schemas/ChatCompletionContentPartImage"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/ChatCompletionContentPartText","image_url":"#/components/schemas/ChatCompletionContentPartImage"}}},"ChatCompletionContentPartText":{"type":"object","description":"Text content part","properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part"},"text":{"type":"string","description":"The text content"}},"required":["type","text"]},"ChatCompletionContentPartImage":{"type":"object","description":"Image content part","properties":{"type":{"type":"string","enum":["image_url"],"description":"The type of the content part"},"image_url":{"$ref":"#/components/schemas/ChatCompletionContentPartImageImageUrl"}},"required":["type","image_url"]},"ChatCompletionContentPartImageImageUrl":{"type":"object","description":"Image URL or data","properties":{"url":{"type":"string","description":"Either a URL of the image or the base64 encoded image data.\nSupported formats:\n- URLs: https://example.com/image.jpg\n- Base64 data URLs: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...\n"},"detail":{"type":"string","description":"Specifies the detail level of the image. \n- \"low\" uses fewer tokens and is faster\n- \"high\" is more detailed but uses more tokens\n- \"auto\" lets the model choose\n","enum":["low","high","auto"],"default":"auto"}},"required":["url"]},"chatCompletionMessageToolCall":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the tool call."},"type":{"$ref":"#/components/schemas/toolCallType"},"function":{"type":"object","description":"The function that the model called.","properties":{"name":{"type":"string","description":"The name of the function to call."},"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."}},"required":["name","arguments"]}},"required":["id","type","function"]},"toolCallType":{"type":"string","enum":["function"],"description":"The type of the tool call, in this case `function`."},"ResponseFormatJSONSchema":{"type":"object","description":"Enable Structured Outputs; model must produce JSON adhering to supplied schema.","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string","description":"Identifier for the schema definition."},"schema":{"type":"object","description":"Root JSON Schema object (must be object with additionalProperties=false)."},"strict":{"type":"boolean","description":"If true, instruct model to strictly follow schema.","default":true}},"required":["name","schema"],"additionalProperties":false}},"required":["type","json_schema"],"additionalProperties":false},"ResponseFormatJSONObject":{"type":"object","description":"Enable JSON mode; model outputs a single valid JSON object (no schema enforcement).","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false},"ResponseFormatText":{"type":"object","description":"Request normal free-form text output (default behavior).","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},"chatCompletionTool":{"type":"object","properties":{"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported."},"function":{"$ref":"#/components/schemas/FunctionObject"}},"required":["type","function"]},"FunctionObject":{"type":"object","properties":{"description":{"type":"string","description":"A description of what the function does, used by the model to choose when and how to call the function."},"name":{"type":"string","description":"The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64."},"parameters":{"$ref":"#/components/schemas/FunctionParameters"}},"required":["name"]},"FunctionParameters":{"type":"object","description":"The parameters the functions accepts, described as a JSON Schema object.","additionalProperties":true},"chatCompletionToolChoiceOption":{"description":"Controls which (if any) tool is called by the model.\n`none` means the model will not call any tool and instead generates a message.\n`auto` means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools.\nSpecifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n`none` is the default when no tools are present. `auto` is the default if tools are present.\n","oneOf":[{"type":"string","description":"`none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools.\n","enum":["none","auto","required"]},{"$ref":"#/components/schemas/chatCompletionNamedToolChoice"}]},"chatCompletionNamedToolChoice":{"type":"object","description":"Specifies a tool the model should use. Use to force the model to call a specific function.","properties":{"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported."},"function":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to call."}},"required":["name"]}},"required":["type","function"]}}}}
```

## The ChatCompletionMessage object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"ChatCompletionMessage":{"type":"object","description":"A message in a chat completion request, supporting both text-only and multimodal content","properties":{"role":{"type":"string","description":"The role of the message's author","enum":["system","user","assistant","tool"]},"content":{"oneOf":[{"type":"string","description":"Text content of the message (legacy format)"},{"type":"array","description":"Array of content parts for multimodal messages","items":{"$ref":"#/components/schemas/ChatCompletionContentPart"}}]},"name":{"type":"string","description":"The name of the author of the message"},"tool_calls":{"type":"array","description":"Tool calls generated by the model","items":{"$ref":"#/components/schemas/chatCompletionMessageToolCall"}},"tool_call_id":{"type":"string","description":"Tool call that this message is responding to"}},"required":["role","content"]},"ChatCompletionContentPart":{"oneOf":[{"$ref":"#/components/schemas/ChatCompletionContentPartText"},{"$ref":"#/components/schemas/ChatCompletionContentPartImage"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/ChatCompletionContentPartText","image_url":"#/components/schemas/ChatCompletionContentPartImage"}}},"ChatCompletionContentPartText":{"type":"object","description":"Text content part","properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part"},"text":{"type":"string","description":"The text content"}},"required":["type","text"]},"ChatCompletionContentPartImage":{"type":"object","description":"Image content part","properties":{"type":{"type":"string","enum":["image_url"],"description":"The type of the content part"},"image_url":{"$ref":"#/components/schemas/ChatCompletionContentPartImageImageUrl"}},"required":["type","image_url"]},"ChatCompletionContentPartImageImageUrl":{"type":"object","description":"Image URL or data","properties":{"url":{"type":"string","description":"Either a URL of the image or the base64 encoded image data.\nSupported formats:\n- URLs: https://example.com/image.jpg\n- Base64 data URLs: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...\n"},"detail":{"type":"string","description":"Specifies the detail level of the image. \n- \"low\" uses fewer tokens and is faster\n- \"high\" is more detailed but uses more tokens\n- \"auto\" lets the model choose\n","enum":["low","high","auto"],"default":"auto"}},"required":["url"]},"chatCompletionMessageToolCall":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the tool call."},"type":{"$ref":"#/components/schemas/toolCallType"},"function":{"type":"object","description":"The function that the model called.","properties":{"name":{"type":"string","description":"The name of the function to call."},"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."}},"required":["name","arguments"]}},"required":["id","type","function"]},"toolCallType":{"type":"string","enum":["function"],"description":"The type of the tool call, in this case `function`."}}}}
```

## The ChatCompletionContentPart object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"ChatCompletionContentPart":{"oneOf":[{"$ref":"#/components/schemas/ChatCompletionContentPartText"},{"$ref":"#/components/schemas/ChatCompletionContentPartImage"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/ChatCompletionContentPartText","image_url":"#/components/schemas/ChatCompletionContentPartImage"}}},"ChatCompletionContentPartText":{"type":"object","description":"Text content part","properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part"},"text":{"type":"string","description":"The text content"}},"required":["type","text"]},"ChatCompletionContentPartImage":{"type":"object","description":"Image content part","properties":{"type":{"type":"string","enum":["image_url"],"description":"The type of the content part"},"image_url":{"$ref":"#/components/schemas/ChatCompletionContentPartImageImageUrl"}},"required":["type","image_url"]},"ChatCompletionContentPartImageImageUrl":{"type":"object","description":"Image URL or data","properties":{"url":{"type":"string","description":"Either a URL of the image or the base64 encoded image data.\nSupported formats:\n- URLs: https://example.com/image.jpg\n- Base64 data URLs: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...\n"},"detail":{"type":"string","description":"Specifies the detail level of the image. \n- \"low\" uses fewer tokens and is faster\n- \"high\" is more detailed but uses more tokens\n- \"auto\" lets the model choose\n","enum":["low","high","auto"],"default":"auto"}},"required":["url"]}}}}
```

## The ChatCompletionContentPartText object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"ChatCompletionContentPartText":{"type":"object","description":"Text content part","properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part"},"text":{"type":"string","description":"The text content"}},"required":["type","text"]}}}}
```

## The ChatCompletionContentPartImage object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"ChatCompletionContentPartImage":{"type":"object","description":"Image content part","properties":{"type":{"type":"string","enum":["image_url"],"description":"The type of the content part"},"image_url":{"$ref":"#/components/schemas/ChatCompletionContentPartImageImageUrl"}},"required":["type","image_url"]},"ChatCompletionContentPartImageImageUrl":{"type":"object","description":"Image URL or data","properties":{"url":{"type":"string","description":"Either a URL of the image or the base64 encoded image data.\nSupported formats:\n- URLs: https://example.com/image.jpg\n- Base64 data URLs: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...\n"},"detail":{"type":"string","description":"Specifies the detail level of the image. \n- \"low\" uses fewer tokens and is faster\n- \"high\" is more detailed but uses more tokens\n- \"auto\" lets the model choose\n","enum":["low","high","auto"],"default":"auto"}},"required":["url"]}}}}
```

## The ChatCompletionContentPartImageImageUrl object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"ChatCompletionContentPartImageImageUrl":{"type":"object","description":"Image URL or data","properties":{"url":{"type":"string","description":"Either a URL of the image or the base64 encoded image data.\nSupported formats:\n- URLs: https://example.com/image.jpg\n- Base64 data URLs: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...\n"},"detail":{"type":"string","description":"Specifies the detail level of the image. \n- \"low\" uses fewer tokens and is faster\n- \"high\" is more detailed but uses more tokens\n- \"auto\" lets the model choose\n","enum":["low","high","auto"],"default":"auto"}},"required":["url"]}}}}
```

## The chatCompletionToolChoiceOption object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"chatCompletionToolChoiceOption":{"description":"Controls which (if any) tool is called by the model.\n`none` means the model will not call any tool and instead generates a message.\n`auto` means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools.\nSpecifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n`none` is the default when no tools are present. `auto` is the default if tools are present.\n","oneOf":[{"type":"string","description":"`none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools.\n","enum":["none","auto","required"]},{"$ref":"#/components/schemas/chatCompletionNamedToolChoice"}]},"chatCompletionNamedToolChoice":{"type":"object","description":"Specifies a tool the model should use. Use to force the model to call a specific function.","properties":{"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported."},"function":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to call."}},"required":["name"]}},"required":["type","function"]}}}}
```

## The chatCompletionNamedToolChoice object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"chatCompletionNamedToolChoice":{"type":"object","description":"Specifies a tool the model should use. Use to force the model to call a specific function.","properties":{"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported."},"function":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to call."}},"required":["name"]}},"required":["type","function"]}}}}
```

## The chatCompletionTool object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"chatCompletionTool":{"type":"object","properties":{"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported."},"function":{"$ref":"#/components/schemas/FunctionObject"}},"required":["type","function"]},"FunctionObject":{"type":"object","properties":{"description":{"type":"string","description":"A description of what the function does, used by the model to choose when and how to call the function."},"name":{"type":"string","description":"The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64."},"parameters":{"$ref":"#/components/schemas/FunctionParameters"}},"required":["name"]},"FunctionParameters":{"type":"object","description":"The parameters the functions accepts, described as a JSON Schema object.","additionalProperties":true}}}}
```

## The FunctionObject object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"FunctionObject":{"type":"object","properties":{"description":{"type":"string","description":"A description of what the function does, used by the model to choose when and how to call the function."},"name":{"type":"string","description":"The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64."},"parameters":{"$ref":"#/components/schemas/FunctionParameters"}},"required":["name"]},"FunctionParameters":{"type":"object","description":"The parameters the functions accepts, described as a JSON Schema object.","additionalProperties":true}}}}
```

## The FunctionParameters object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"FunctionParameters":{"type":"object","description":"The parameters the functions accepts, described as a JSON Schema object.","additionalProperties":true}}}}
```

## The chatCompletionMessageToolCall object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"chatCompletionMessageToolCall":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the tool call."},"type":{"$ref":"#/components/schemas/toolCallType"},"function":{"type":"object","description":"The function that the model called.","properties":{"name":{"type":"string","description":"The name of the function to call."},"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."}},"required":["name","arguments"]}},"required":["id","type","function"]},"toolCallType":{"type":"string","enum":["function"],"description":"The type of the tool call, in this case `function`."}}}}
```

## The toolCallType object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"toolCallType":{"type":"string","enum":["function"],"description":"The type of the tool call, in this case `function`."}}}}
```

## The SuccessfulChatCompletionResponse object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"SuccessfulChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"type":"string"},"index":{"type":"integer"},"message":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":"string"},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/chatCompletionMessageToolCall"},"readOnly":true},"refusal":{"type":"string","description":"Present when the model refuses to answer for safety/policy reasons."}}},"logprobs":{"type":"object","nullable":true,"description":"Log probability information for the choice.","properties":{"content":{"type":"array","nullable":true,"description":"A list of message content tokens with log probability information.","items":{"type":"object","properties":{"token":{"type":"string","description":"The token."},"logprob":{"type":"number","description":"The log probability of this token."},"bytes":{"type":"array","nullable":true,"description":"A list of integers representing the UTF-8 bytes representation of the token.","items":{"type":"integer"}},"top_logprobs":{"type":"array","description":"List of the most likely tokens and their log probability, at this token position.","items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":"array","nullable":true,"items":{"type":"integer"}}}}}}}}}}}}},"created":{"type":"integer"},"object":{"type":"string"},"model":{"type":"string"},"system_fingerprint":{"type":"string"},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"completion_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer"}}}}}}},"chatCompletionMessageToolCall":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the tool call."},"type":{"$ref":"#/components/schemas/toolCallType"},"function":{"type":"object","description":"The function that the model called.","properties":{"name":{"type":"string","description":"The name of the function to call."},"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."}},"required":["name","arguments"]}},"required":["id","type","function"]},"toolCallType":{"type":"string","enum":["function"],"description":"The type of the tool call, in this case `function`."}}}}
```

## The ImageGenerationRequest object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"ImageGenerationRequest":{"type":"object","properties":{"model":{"type":"string","description":"ID of the model to use. Please check /v1/models for available models"},"prompt":{"type":"string","description":"The prompt to generate images from"},"n":{"type":"integer","default":1,"minimum":1,"maximum":10,"description":"The number of images to generate. Defaults to 1."},"size":{"type":"string","pattern":"^\\d+\\*\\d+$","default":"1024*1024","description":"The size of the image to generate, in `\"width*height\"` format.\nDefaults to `\"1024*1024\"`.\nBoth width and height must be multiples of 16 and between 64 and 2048 (inclusive).\n"},"output_format":{"type":"string","description":"The file format of the generated image.\nDefaults to `png`.\n","default":"png"},"user":{"type":"string","description":"A unique identifier representing your end-user"}},"required":["model","prompt"]}}}}
```

## The ImageEditRequest object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"ImageEditRequest":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"URL of the image to edit.\nSupported formats: public HTTP/HTTPS URLs or base64 data URLs (e.g. `data:image/png;base64,...`).\nIf a mask is not provided, the model will use the entire image as the area to edit.\n"},"prompt":{"type":"string","maxLength":1000,"description":"A text description of the desired image(s). Maximum length is 1000 characters."},"mask_image":{"type":"string","format":"Data URI","description":"A base64-encoded mask image in `data:image/png;base64,<encoded-data>` format.\nFully transparent areas (alpha = 0) indicate where the image should be edited.\nMust have the same dimensions as the input image.\n"},"model":{"type":"string","description":"ID of the model to use. Please check /v1/models for available models."},"n":{"type":"integer","default":1,"minimum":1,"maximum":10,"description":"The number of images to generate. Defaults to 1."},"size":{"type":"string","pattern":"^\\d+\\*\\d+$","default":"1024*1024","description":"The size of the generated images, in `\"width*height\"` format.\nDefaults to `\"1024*1024\"`.\nBoth width and height must be multiples of 16 and between 64 and 2048 (inclusive).\n"},"output_format":{"type":"string","description":"The file format of the generated image.\nDefaults to `png`.\n","default":"png"},"user":{"type":"string","description":"A unique identifier representing your end-user."}},"required":["model","url","prompt"]}}}}
```

## The ImageGenerationResponse object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"ImageGenerationResponse":{"type":"object","properties":{"created":{"type":"integer","description":"The Unix timestamp of the image generation"},"data":{"type":"array","description":"The list of generated images","items":{"type":"object","properties":{"url":{"type":"string","description":"The URL of the generated image.\nAs of right now, this format is not supported\n","default":null},"b64_json":{"type":"string","description":"The base64 encoded image in JSON format.\n"},"revised_prompt":{"type":"string","description":"Refined initial text prompt for improved image generation using advanced language model capabilities.\nAs of right now, this format is not supported\n"}}}}}}}}}
```

## The EmbeddingRequest object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"EmbeddingRequest":{"type":"object","properties":{"model":{"type":"string","description":"ID of the model to use. Please check /v1/models for available models"},"input":{"oneOf":[{"type":"string","description":"The input text to create an embedding for (single string)"},{"type":"array","description":"The input text to create embeddings for (list of strings)","items":{"type":"string"}}],"description":"Text input for text-only embedding models. Mutually exclusive with messages.\n"},"messages":{"type":"array","description":"Chat-style messages for multimodal embedding models (vLLM extension). Supports the same format as chat completions, enabling multimodal inputs (text, images) to be passed to embedding models. Mutually exclusive with input.\n","items":{"$ref":"#/components/schemas/ChatCompletionMessage"}}},"required":["model"],"oneOf":[{"type":"object","required":["input"],"not":{"type":"object","required":["messages"]}},{"type":"object","required":["messages"],"not":{"type":"object","required":["input"]}}]},"ChatCompletionMessage":{"type":"object","description":"A message in a chat completion request, supporting both text-only and multimodal content","properties":{"role":{"type":"string","description":"The role of the message's author","enum":["system","user","assistant","tool"]},"content":{"oneOf":[{"type":"string","description":"Text content of the message (legacy format)"},{"type":"array","description":"Array of content parts for multimodal messages","items":{"$ref":"#/components/schemas/ChatCompletionContentPart"}}]},"name":{"type":"string","description":"The name of the author of the message"},"tool_calls":{"type":"array","description":"Tool calls generated by the model","items":{"$ref":"#/components/schemas/chatCompletionMessageToolCall"}},"tool_call_id":{"type":"string","description":"Tool call that this message is responding to"}},"required":["role","content"]},"ChatCompletionContentPart":{"oneOf":[{"$ref":"#/components/schemas/ChatCompletionContentPartText"},{"$ref":"#/components/schemas/ChatCompletionContentPartImage"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/ChatCompletionContentPartText","image_url":"#/components/schemas/ChatCompletionContentPartImage"}}},"ChatCompletionContentPartText":{"type":"object","description":"Text content part","properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part"},"text":{"type":"string","description":"The text content"}},"required":["type","text"]},"ChatCompletionContentPartImage":{"type":"object","description":"Image content part","properties":{"type":{"type":"string","enum":["image_url"],"description":"The type of the content part"},"image_url":{"$ref":"#/components/schemas/ChatCompletionContentPartImageImageUrl"}},"required":["type","image_url"]},"ChatCompletionContentPartImageImageUrl":{"type":"object","description":"Image URL or data","properties":{"url":{"type":"string","description":"Either a URL of the image or the base64 encoded image data.\nSupported formats:\n- URLs: https://example.com/image.jpg\n- Base64 data URLs: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...\n"},"detail":{"type":"string","description":"Specifies the detail level of the image. \n- \"low\" uses fewer tokens and is faster\n- \"high\" is more detailed but uses more tokens\n- \"auto\" lets the model choose\n","enum":["low","high","auto"],"default":"auto"}},"required":["url"]},"chatCompletionMessageToolCall":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the tool call."},"type":{"$ref":"#/components/schemas/toolCallType"},"function":{"type":"object","description":"The function that the model called.","properties":{"name":{"type":"string","description":"The name of the function to call."},"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."}},"required":["name","arguments"]}},"required":["id","type","function"]},"toolCallType":{"type":"string","enum":["function"],"description":"The type of the tool call, in this case `function`."}}}}
```

## The EmbeddingResponse object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"EmbeddingResponse":{"type":"object","properties":{"model":{"type":"string","description":"ID of the model used"},"object":{"type":"string","description":"The object used to generate the embeddings"},"data":{"type":"array","description":"The list of generated embeddings","items":{"$ref":"#/components/schemas/Embedding"}},"usage":{"$ref":"#/components/schemas/EmbeddingUsage"}}},"Embedding":{"type":"object","properties":{"index":{"type":"integer","description":"The index of the input text"},"object":{"type":"string","description":"The object used to generate the embeddings"},"embedding":{"type":"array","description":"The embedding vector","items":{"type":"number","format":"float"}}}},"EmbeddingUsage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","description":"The number of tokens in the input text"},"total_tokens":{"type":"integer","description":"The total number of tokens used"}}}}}}
```

## The Embedding object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"Embedding":{"type":"object","properties":{"index":{"type":"integer","description":"The index of the input text"},"object":{"type":"string","description":"The object used to generate the embeddings"},"embedding":{"type":"array","description":"The embedding vector","items":{"type":"number","format":"float"}}}}}}}
```

## The EmbeddingUsage object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"EmbeddingUsage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","description":"The number of tokens in the input text"},"total_tokens":{"type":"integer","description":"The total number of tokens used"}}}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"ErrorResponse":{"type":"object","description":"OpenAI-compatible error response. Returned for error responses that define this schema (for example, 429 Too Many Requests). Note: the backend currently returns an IONOS-native error body format; alignment to this schema is tracked in GPHML-2078.\n","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable error description."},"type":{"type":"string","description":"Error category (e.g. \"requests\", \"invalid_request_error\")."},"code":{"type":"string","nullable":true,"description":"Machine-readable error code (e.g. \"rate_limit_exceeded\"). May be null or omitted."},"param":{"type":"string","nullable":true,"description":"Parameter related to the error, if applicable. May be null or omitted."}},"required":["message","type"]}},"required":["error"]}}}}
```

## The RerankRequest object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"RerankRequest":{"type":"object","properties":{"model":{"type":"string","description":"ID of the model to use"},"query":{"type":"string","description":"The query to rank documents against"},"documents":{"oneOf":[{"type":"array","description":"A list of documents as plain text strings","minItems":1,"items":{"type":"string"}},{"type":"array","description":"A list of multimodal documents","minItems":1,"items":{"type":"object","properties":{"content":{"type":"array","description":"Content parts of the document (text, images, etc.)","items":{"oneOf":[{"$ref":"#/components/schemas/ChatCompletionContentPartText"},{"$ref":"#/components/schemas/ChatCompletionContentPartImage"}]}}},"required":["content"]}}],"description":"The documents to be ranked against the query. Can be a list of strings for text-only models, or a list of objects with a content array for multimodal models.\n"},"top_n":{"type":"integer","description":"Number of top results to return. 0 or omitted means return all documents.","default":0,"minimum":0}},"required":["model","query","documents"]},"ChatCompletionContentPartText":{"type":"object","description":"Text content part","properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part"},"text":{"type":"string","description":"The text content"}},"required":["type","text"]},"ChatCompletionContentPartImage":{"type":"object","description":"Image content part","properties":{"type":{"type":"string","enum":["image_url"],"description":"The type of the content part"},"image_url":{"$ref":"#/components/schemas/ChatCompletionContentPartImageImageUrl"}},"required":["type","image_url"]},"ChatCompletionContentPartImageImageUrl":{"type":"object","description":"Image URL or data","properties":{"url":{"type":"string","description":"Either a URL of the image or the base64 encoded image data.\nSupported formats:\n- URLs: https://example.com/image.jpg\n- Base64 data URLs: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...\n"},"detail":{"type":"string","description":"Specifies the detail level of the image. \n- \"low\" uses fewer tokens and is faster\n- \"high\" is more detailed but uses more tokens\n- \"auto\" lets the model choose\n","enum":["low","high","auto"],"default":"auto"}},"required":["url"]}}}}
```

## The RerankResponse object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"RerankResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the rerank request"},"model":{"type":"string","description":"Model name used for reranking"},"results":{"type":"array","description":"Results sorted by relevance score in descending order","items":{"$ref":"#/components/schemas/RerankResult"}},"usage":{"$ref":"#/components/schemas/RerankUsage"}}},"RerankResult":{"type":"object","properties":{"index":{"type":"integer","description":"Original index of this document in the input array"},"document":{"description":"The echoed document. Text documents are returned as an object with a `text` field; multimodal documents are returned as an object with a `content` array.","oneOf":[{"type":"object","properties":{"text":{"type":"string","description":"The document text (for plain-text inputs)"}}},{"type":"object","properties":{"content":{"type":"array","description":"Content parts of the document (for multimodal inputs)","items":{"oneOf":[{"$ref":"#/components/schemas/ChatCompletionContentPartText"},{"$ref":"#/components/schemas/ChatCompletionContentPartImage"}]}}}}]},"relevance_score":{"type":"number","format":"float","description":"Relevance score (typically 0.0 to 1.0)"}}},"ChatCompletionContentPartText":{"type":"object","description":"Text content part","properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part"},"text":{"type":"string","description":"The text content"}},"required":["type","text"]},"ChatCompletionContentPartImage":{"type":"object","description":"Image content part","properties":{"type":{"type":"string","enum":["image_url"],"description":"The type of the content part"},"image_url":{"$ref":"#/components/schemas/ChatCompletionContentPartImageImageUrl"}},"required":["type","image_url"]},"ChatCompletionContentPartImageImageUrl":{"type":"object","description":"Image URL or data","properties":{"url":{"type":"string","description":"Either a URL of the image or the base64 encoded image data.\nSupported formats:\n- URLs: https://example.com/image.jpg\n- Base64 data URLs: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...\n"},"detail":{"type":"string","description":"Specifies the detail level of the image. \n- \"low\" uses fewer tokens and is faster\n- \"high\" is more detailed but uses more tokens\n- \"auto\" lets the model choose\n","enum":["low","high","auto"],"default":"auto"}},"required":["url"]},"RerankUsage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","description":"Number of prompt tokens processed"},"total_tokens":{"type":"integer","description":"Total tokens processed"}}}}}}
```

## The RerankResult object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"RerankResult":{"type":"object","properties":{"index":{"type":"integer","description":"Original index of this document in the input array"},"document":{"description":"The echoed document. Text documents are returned as an object with a `text` field; multimodal documents are returned as an object with a `content` array.","oneOf":[{"type":"object","properties":{"text":{"type":"string","description":"The document text (for plain-text inputs)"}}},{"type":"object","properties":{"content":{"type":"array","description":"Content parts of the document (for multimodal inputs)","items":{"oneOf":[{"$ref":"#/components/schemas/ChatCompletionContentPartText"},{"$ref":"#/components/schemas/ChatCompletionContentPartImage"}]}}}}]},"relevance_score":{"type":"number","format":"float","description":"Relevance score (typically 0.0 to 1.0)"}}},"ChatCompletionContentPartText":{"type":"object","description":"Text content part","properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part"},"text":{"type":"string","description":"The text content"}},"required":["type","text"]},"ChatCompletionContentPartImage":{"type":"object","description":"Image content part","properties":{"type":{"type":"string","enum":["image_url"],"description":"The type of the content part"},"image_url":{"$ref":"#/components/schemas/ChatCompletionContentPartImageImageUrl"}},"required":["type","image_url"]},"ChatCompletionContentPartImageImageUrl":{"type":"object","description":"Image URL or data","properties":{"url":{"type":"string","description":"Either a URL of the image or the base64 encoded image data.\nSupported formats:\n- URLs: https://example.com/image.jpg\n- Base64 data URLs: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...\n"},"detail":{"type":"string","description":"Specifies the detail level of the image. \n- \"low\" uses fewer tokens and is faster\n- \"high\" is more detailed but uses more tokens\n- \"auto\" lets the model choose\n","enum":["low","high","auto"],"default":"auto"}},"required":["url"]}}}}
```

## The RerankUsage object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"RerankUsage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","description":"Number of prompt tokens processed"},"total_tokens":{"type":"integer","description":"Total tokens processed"}}}}}}
```

## The ResponseFormatText object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"ResponseFormatText":{"type":"object","description":"Request normal free-form text output (default behavior).","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false}}}}
```

## The ResponseFormatJSONObject object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"ResponseFormatJSONObject":{"type":"object","description":"Enable JSON mode; model outputs a single valid JSON object (no schema enforcement).","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false}}}}
```

## The ResponseFormatJSONSchema object

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - OpenAI compatible AI Model Hub API","version":"1.0.0"},"components":{"schemas":{"ResponseFormatJSONSchema":{"type":"object","description":"Enable Structured Outputs; model must produce JSON adhering to supplied schema.","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string","description":"Identifier for the schema definition."},"schema":{"type":"object","description":"Root JSON Schema object (must be object with additionalProperties=false)."},"strict":{"type":"boolean","description":"If true, instruct model to strictly follow schema.","default":true}},"required":["name","schema"],"additionalProperties":false}},"required":["type","json_schema"],"additionalProperties":false}}}}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
