# Foundation Models

Browse and call foundation models.

## Retrieve available AI models

> \*\*Deprecated\*\* – This endpoint will be removed on \*\*2026-05-05\*\*.\
> Please refer to the \[Migration Guide]\(<https://docs.ionos.com/cloud/ai/ai-model-hub/how-tos/migration-guide>) \
> for instructions on how to migrate.\
> \
> Retreieve the list of AI models running on the IONOS AI Model Hub.\
> The model identifier is then used with the /predictions endpoint.<br>

```json
{"openapi":"3.0.3","info":{"title":"IONOS Cloud - AI Model Hub API","version":"1.0.0"},"tags":[{"name":"Foundation Models","description":"Browse and call foundation models."}],"servers":[{"url":"https://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 to add 'Bearer' HTTP Authorization Scheme before the token."}},"schemas":{"ModelsCollection":{"deprecated":true,"type":"object","description":"**Deprecated** – This schema will be removed on **2026-05-05**.\nPlease refer to the [Migration Guide](https://docs.ionos.com/cloud/ai/ai-model-hub/how-tos/migration-guide) \nfor instructions on how to migrate.\n","properties":{"id":{"type":"string","description":"Unique Collection Identifier","readOnly":true},"type":{"type":"string","description":"Entity type","enum":["collection"]},"href":{"type":"string","description":"Resource URL"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Model"},"description":"The list of pretrained models available with the inference service."}},"required":["id","type","href","items"]},"Model":{"deprecated":true,"type":"object","description":"**Deprecated** – This schema will be removed on **2026-05-05**.\nPlease refer to the [Migration Guide](https://docs.ionos.com/cloud/ai/ai-model-hub/how-tos/migration-guide) \nfor instructions on how to migrate.\n","properties":{"id":{"type":"string","readOnly":true,"description":"The unique identifier of the model."},"type":{"type":"string","readOnly":true,"description":"Entity type."},"properties":{"$ref":"#/components/schemas/ModelProperties"},"metadata":{"$ref":"#/components/schemas/Metadata"}},"required":["id","type","metadata","properties"]},"ModelProperties":{"deprecated":true,"type":"object","description":"**Deprecated** – This schema will be removed on **2026-05-05**.\nPlease refer to the [Migration Guide](https://docs.ionos.com/cloud/ai/ai-model-hub/how-tos/migration-guide) \nfor instructions on how to migrate.\n","properties":{"name":{"type":"string","description":"The name of the model."},"description":{"type":"string","description":"The description of the model."},"category":{"type":"string","enum":["text/nlp"],"description":"The type/category of the model."}},"required":["name","description","category"]},"Metadata":{"type":"object","description":"Metadata of the resource.","readOnly":true,"properties":{"lastModifiedDate":{"type":"string","readOnly":true,"format":"date-time","description":"The date of the last change formatted as yyyy-MM-dd'T'HH:mm:ss.SSS'Z'."},"createdDate":{"type":"string","readOnly":true,"format":"date-time","description":"The date of creation of the zone formatted as yyyy-MM-dd'T'HH:mm:ss.SSS'Z'."}}},"Error":{"type":"object","additionalProperties":false,"properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation as specified by [RFC 7231](https://datatracker.ietf.org/doc/html/rfc7231#section-6).\n"},"messages":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"errorCode":{"type":"string","description":"Internal error code.\n"},"message":{"type":"string","description":"Human readable explanation of the issue.\n"}}}}}}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request send to the API was malformed.\n","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","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"### Forbidden\nThe user issuing the request does not have the needed permissions.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nAn internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/models":{"get":{"operationId":"modelsGet","deprecated":true,"summary":"Retrieve available AI models","description":"**Deprecated** – This endpoint will be removed on **2026-05-05**.\nPlease refer to the [Migration Guide](https://docs.ionos.com/cloud/ai/ai-model-hub/how-tos/migration-guide) \nfor instructions on how to migrate.\n\nRetreieve the list of AI models running on the IONOS AI Model Hub.\nThe model identifier is then used with the /predictions endpoint.\n","tags":["Foundation Models"],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsCollection"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Send a request to the selected AI model

> \*\*Deprecated\*\* – This endpoint will be removed on \*\*2026-05-05\*\*.\
> Please refer to the \[Migration Guide]\(<https://docs.ionos.com/cloud/ai/ai-model-hub/how-tos/migration-guide>) \
> for instructions on how to migrate.\
> \
> Send a request to the AI model and receive the result. The endpoint is \
> synchronous and will return as soon as the model generates the full reply.<br>

```json
{"openapi":"3.0.3","info":{"title":"IONOS Cloud - AI Model Hub API","version":"1.0.0"},"tags":[{"name":"Foundation Models","description":"Browse and call foundation models."}],"servers":[{"url":"https://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 to add 'Bearer' HTTP Authorization Scheme before the token."}},"schemas":{"ModelsPredictionBody":{"deprecated":true,"type":"object","description":"**Deprecated** – This schema will be removed on **2026-05-05**.\nPlease refer to the [Migration Guide](https://docs.ionos.com/cloud/ai/ai-model-hub/how-tos/migration-guide) \nfor instructions on how to migrate.\n","properties":{"type":{"type":"string","description":"The entity type","enum":["prediction"],"readOnly":true},"properties":{"$ref":"#/components/schemas/PredictionProperties"}},"required":["type","properties"]},"PredictionProperties":{"deprecated":true,"type":"object","description":"**Deprecated** – This schema will be removed on **2026-05-05**.\nPlease refer to the [Migration Guide](https://docs.ionos.com/cloud/ai/ai-model-hub/how-tos/migration-guide) \nfor instructions on how to migrate.\n","properties":{"input":{"description":"The input required for the model to run the prediction. For NLP models this is plain text.","type":"string"},"collectionId":{"description":"ID of the collection","type":"string"},"collectionQuery":{"description":"Query for the collection","type":"string"},"options":{"type":"object","additionalProperties":{"type":"string"}},"additionalOutput":{"type":"object","readOnly":true,"additionalProperties":{"type":"string"}},"output":{"type":"string","readOnly":true,"description":"The output of the model."},"inputLengthInTokens":{"description":"Tokens for input","type":"integer","format":"int32"},"outputLengthInTokens":{"description":"Tokens for output","type":"integer","format":"int32"}},"required":["input"]},"ModelsPrediction":{"deprecated":true,"type":"object","description":"**Deprecated** – This schema will be removed on **2026-05-05**.\nPlease refer to the [Migration Guide](https://docs.ionos.com/cloud/ai/ai-model-hub/how-tos/migration-guide) \nfor instructions on how to migrate.\n","properties":{"type":{"type":"string","description":"The entity type","enum":["prediction"],"readOnly":true},"properties":{"$ref":"#/components/schemas/PredictionProperties"},"metadata":{"$ref":"#/components/schemas/MetadataWithDuration"}},"required":["type","metadata","properties"]},"MetadataWithDuration":{"allOf":[{"$ref":"#/components/schemas/Metadata"},{"type":"object","readOnly":true,"properties":{"duration":{"type":"number","format":"float","readOnly":true,"description":"The time it took for the model to generate the output (in ms)."},"outputTokens":{"type":"number","readOnly":true,"description":"The length in tokens of the output generated by the model."},"inputTokens":{"type":"number","readOnly":true,"description":"The length in tokens of the input sent to the model."}}}]},"Metadata":{"type":"object","description":"Metadata of the resource.","readOnly":true,"properties":{"lastModifiedDate":{"type":"string","readOnly":true,"format":"date-time","description":"The date of the last change formatted as yyyy-MM-dd'T'HH:mm:ss.SSS'Z'."},"createdDate":{"type":"string","readOnly":true,"format":"date-time","description":"The date of creation of the zone formatted as yyyy-MM-dd'T'HH:mm:ss.SSS'Z'."}}},"Error":{"type":"object","additionalProperties":false,"properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation as specified by [RFC 7231](https://datatracker.ietf.org/doc/html/rfc7231#section-6).\n"},"messages":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"errorCode":{"type":"string","description":"Internal error code.\n"},"message":{"type":"string","description":"Human readable explanation of the issue.\n"}}}}}}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request send to the API was malformed.\n","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","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"### Forbidden\nThe user issuing the request does not have the needed permissions.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"### Not Found\nThe resource that was requested could not be found.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nAn internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/models/{modelId}/predictions":{"post":{"operationId":"modelsPredictionsPost","deprecated":true,"summary":"Send a request to the selected AI model","description":"**Deprecated** – This endpoint will be removed on **2026-05-05**.\nPlease refer to the [Migration Guide](https://docs.ionos.com/cloud/ai/ai-model-hub/how-tos/migration-guide) \nfor instructions on how to migrate.\n\nSend a request to the AI model and receive the result. The endpoint is \nsynchronous and will return as soon as the model generates the full reply.\n","parameters":[{"name":"modelId","in":"path","schema":{"type":"string"},"required":true,"description":"The ID of the model."}],"requestBody":{"description":"Prediction input","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsPredictionBody"}}}},"tags":["Foundation Models"],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsPrediction"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```
