Download OpenAPI specification:Download
Retreieve the list of AI models running on the IONOS AI Model Hub. The model identifier is then used with the /predictions endpoint.
{- "id": "9fa7d335-209c-5a1e-a8b2-686772fe7a33",
- "type": "collection",
- "href": "<RESOURCE-URL>",
- "items": [
- {
- "id": "4b71d0fe-d992-463e-82a1-de337d88ac2d",
- "type": "model",
- "metadata": {
- "lastModifiedDate": "2023-07-21T15:52:53Z",
- "createdDate": "2023-07-21T15:52:53Z"
}, - "properties": {
- "name": "bloom-7b",
- "description": "BLOOM 7B model",
- "category": "text/nlp"
}
}, - {
- "id": "3a62d0fe-d992-463e-82a1-de337d88ac42",
- "type": "model",
- "metadata": {
- "lastModifiedDate": "2022-08-21T15:52:53Z",
- "createdDate": "2022-08-21T15:52:53Z"
}, - "properties": {
- "name": "othermodel-13b",
- "description": "Other model 13B",
- "category": "text/nlp"
}
}
]
}
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.
modelId required | string The ID of the model. |
Prediction input
required | object (PredictionProperties) |
{- "type": "prediction",
- "properties": {
- "input": "Please provide some sugestion names for my business. I own a flower shop in Berlin.",
- "collectionId": "550e8400-e29b-41d4-a716-446655440000",
- "collectionQuery": "What is a domain?",
- "options": {
- "max_length": "300",
- "temperature": "0.01"
}
}
}
{- "type": "prediction",
- "metadata": {
- "lastModifiedDate": "2022-08-21T15:52:53Z",
- "createdDate": "2022-08-21T15:52:53Z",
- "duration": 0.01
}, - "properties": {
- "input": "Please provide some sugestion names for my business. I own a flower shop in Berlin.",
- "options": {
- "max_length": "300",
- "temperature": "0.01"
}, - "output": "The ML model said something smart"
}
}
Create a new, empty document collection for storing documents
Collection input
required | object Collection properties. |
{- "type": "collection",
- "properties": {
- "name": "My collection",
- "description": "My collection description"
}
}
{- "id": "9fa7d335-209c-5a1e-a8b2-686772fe7a33",
- "type": "collection",
- "href": "<RESOURCE-URL>",
- "properties": {
- "name": "My collection",
- "description": "My collection description"
}, - "metadata": {
- "lastModifiedDate": "2023-07-21T15:52:53Z",
- "createdDate": "2023-07-21T15:52:53Z"
}
}
Retrieve all stored document collections
limit | integer Default: 100 The maximum number of collections to return - defaults to 100 |
offset | integer Default: 0 The offset to start from - defaults to 0 |
{- "id": "9fa7d335-209c-5a1e-a8b2-686772fe7a33",
- "type": "collection",
- "href": "<RESOURCE-URL>",
- "items": [
- {
- "id": "4b71d0fe-d992-463e-82a1-de337d88ac2d",
- "type": "collection",
- "metadata": {
- "lastModifiedDate": "2023-07-21T15:52:53Z",
- "createdDate": "2023-07-21T15:52:53Z"
}, - "properties": {
- "name": "My collection",
- "description": "My collection description"
}
}, - {
- "id": "3a62d0fe-d992-463e-82a1-de337d88ac42",
- "type": "collection",
- "metadata": {
- "lastModifiedDate": "2022-08-21T15:52:53Z",
- "createdDate": "2022-08-21T15:52:53Z"
}, - "properties": {
- "name": "My other collection",
- "description": "My other collection description"
}
}
]
}
Returns the properties and metadata for the document collection
collectionId required | string The ID of the collection. |
{- "id": "9fa7d335-209c-5a1e-a8b2-686772fe7a33",
- "type": "collection",
- "href": "<RESOURCE-URL>",
- "properties": {
- "name": "My collection",
- "description": "My collection description"
}, - "metadata": {
- "lastModifiedDate": "2023-07-21T15:52:53Z",
- "createdDate": "2023-07-21T15:52:53Z"
}
}
Update collection details and metadata. No modification is done on the documents.
collectionId required | string The ID of the collection. |
Collection input
required | object (CollectionPropertiesUpdate) non-empty Collection properties. |
{- "type": "collection",
- "properties": {
- "name": "My collection",
- "description": "My collection description"
}
}
{- "id": "9fa7d335-209c-5a1e-a8b2-686772fe7a33",
- "type": "collection",
- "href": "<RESOURCE-URL>",
- "properties": {
- "name": "My collection",
- "description": "My collection description"
}
}
Delete a collection and all documents stored in it
collectionId required | string The ID of the collection. |
{- "httpStatus": 400,
- "messages": [
- {
- "errorCode": "inference-rest-0123",
- "message": "example error message"
}
]
}
Get the list of documents stored in the collection
collectionId required | string The ID of the collection. |
limit | integer Default: 100 The maximum number of documents to return - defaults to 100 |
offset | integer Default: 0 The offset to start from - defaults to 0 |
{- "id": "63a7d335-209c-5a1e-a8b2-686772fe2e55",
- "type": "collection",
- "href": "<RESOURCE-URL>",
- "items": [
- {
- "id": "9fa7d335-209c-5a1e-a8b2-686772fe7a33",
- "type": "document",
- "properties": {
- "contentType": "text/plain",
- "name": "Lorem doc 1",
- "content": "<DOCUMENT-CONTENT-BASE64-ENCODED>"
}, - "metadata": {
- "lastModifiedDate": "2022-07-19T15:52:53Z",
- "createdDate": "2022-07-19T15:52:53Z"
}
}, - {
- "id": "7ea7d335-209c-5a1e-a8b2-686772fe7a22",
- "type": "document",
- "properties": {
- "contentType": "text/plain",
- "name": "Lorem doc 2",
- "content": "<DOCUMENT-CONTENT-BASE64-ENCODED>"
}, - "metadata": {
- "lastModifiedDate": "2022-08-21T15:52:53Z",
- "createdDate": "2022-08-21T15:52:53Z"
}
}
]
}
Add documents to the collection. Already existing documents will be replaced
collectionId required | string The ID of the collection. |
Document input
required | Array of objects (DocumentCreate) The list of all documents in a collection |
{- "type": "collection",
- "items": [
- {
- "type": "document",
- "properties": {
- "name": "Lorem Doc 1",
- "description": "This is a document about lorem ipsum",
- "contentType": "text/plain",
- "content": "<DOCUMENT-CONTENT-BASE64-ENCODED>",
- "labels": {
- "topic": "linux",
- "subtopic": "networking"
}
}
}
]
}
{- "id": "collection_id",
- "type": "collection",
- "href": "collection_href",
- "items": [
- {
- "type": "document",
- "properties": {
- "name": "Lorem Doc 1",
- "description": "This is a document about lorem ipsum",
- "contentType": "text/plain",
- "content": "<DOCUMENT-CONTENT-BASE64-ENCODED>",
- "labels": {
- "topic": "linux",
- "subtopic": "networking"
}
}
}
]
}
Delete all documents from a collection, thus pruning it
collectionId required | string The ID of the collection. |
{- "httpStatus": 400,
- "messages": [
- {
- "errorCode": "inference-rest-0123",
- "message": "example error message"
}
]
}
Retreieve document's details.
collectionId required | string The ID of the collection. |
documentId required | string The ID of the document. |
{- "id": "9fa7d335-209c-5a1e-a8b2-686772fe7a33",
- "type": "document",
- "href": "<RESOURCE-URL>",
- "properties": {
- "contentType": "text/plain",
- "name": "Lorem doc 1",
- "content": "<DOCUMENT-CONTENT-BASE64-ENCODED>"
}, - "metadata": {
- "lastModifiedDate": "2022-07-19T15:52:53Z",
- "createdDate": "2022-07-19T15:52:53Z"
}
}
Update a document
collectionId required | string The ID of the collection. |
documentId required | string The ID of the document. |
Document input
required | object (DocumentProperties) non-empty Document properties. |
{- "type": "document",
- "properties": {
- "name": "Lorem Doc 1",
- "description": "This is a document about lorem ipsum",
- "contentType": "text/plain",
- "content": "<DOCUMENT-CONTENT-BASE64-ENCODED>",
- "labels": {
- "topic": "linux",
- "subtopic": "networking"
}
}
}
{- "id": "9fa7d335-209c-5a1e-a8b2-686772fe7a33",
- "type": "document",
- "href": "<RESOURCE-URL>",
- "properties": {
- "contentType": "text/plain",
- "name": "Lorem doc 1",
- "content": "<DOCUMENT-CONTENT-BASE64-ENCODED>"
}, - "metadata": {
- "lastModifiedDate": "2022-07-19T15:52:53Z",
- "createdDate": "2022-07-19T15:52:53Z"
}
}
Remove a document from the collection
collectionId required | string The ID of the collection. |
documentId required | string The ID of the document. |
{- "httpStatus": 400,
- "messages": [
- {
- "errorCode": "inference-rest-0123",
- "message": "example error message"
}
]
}
Query a collection / search for related content. This endpoint is used to return relevant documents from a collection.
collectionId required | string The ID of the collection. |
Query string and parameters.
query required | string non-empty The string used to query the vector database. |
limit | integer Default: 10 The maximum number of matches to return. |
{- "limit": 5,
- "query": "What is Managed Kubernetes?"
}
{- "type": "result",
- "metadata": {
- "lastModifiedDate": "2022-08-21T15:52:53Z",
- "createdDate": "2022-08-21T15:52:53Z",
- "duration": 0.01
}, - "properties": {
- "matches": [
- {
- "document": {
- "id": "9fa7d335-209c-5a1e-a8b2-686772fe7a33",
- "type": "document",
- "href": "<RESOURCE-URL>",
- "properties": {
- "contentType": "text/plain",
- "name": "Lorem doc 1",
- "content": "<DOCUMENT-CONTENT-BASE64-ENCODED>"
}, - "metadata": {
- "lastModifiedDate": "2022-07-19T15:52:53Z",
- "createdDate": "2022-07-19T15:52:53Z"
}
}, - "score": 0.99
}, - {
- "document": {
- "id": "7ea7d335-209c-5a1e-a8b2-686772fe7a22",
- "type": "document",
- "href": "<RESOURCE-URL>",
- "properties": {
- "contentType": "text/plain",
- "name": "Lorem doc 2",
- "content": "<DOCUMENT-CONTENT-BASE64-ENCODED>"
}
}
}
]
}
}