FAQ
API errors
The AI Model Hub is designed primarily as an API-first solution. While this approach enables seamless integration into existing codebases, it also presents a challenge: errors and problems that occur may not always be immediately visible or diagnosable. This FAQ addresses the most common problems and guides on their resolution:
How do I fix an unauthorized, incorrect, or no API key error?
Our How-Tos documentation assume you have an environment variable called IONOS_API_TOKEN. The value of this environment variable needs to be a valid Authentication Token. If you get the described error, two reasons are possible:
IONOS_API_TOKEN is not set: Check whether your system's environment variable is set. The simplest way to do this is by adding the line
import os print(os.environ.get("IONOS_API_TOKEN"))to your code. If nothing is shown, the environment variable is not set. Please set it.
Your Authentication Token is not valid: If the IONOS_API_TOKEN environment variable is set, but you still see this error, your authentication token might not be valid. Create a new Authentication Token as described in Access Management.
How do I fix a 404 Not Found error?
Communication with the AI Model Hub is by API endpoints. These endpoints often contain IDs, like a Model ID or a resource-specific identifier. If a resource has been deleted or the ID is incorrect, the request returns a 404 Not Found error.
To confirm that the ID exists, call the parent collection endpoint with a GET request and check the returned list for the ID you intend to use.
How do I fix a 500 Internal Server error?
We do our best to ensure our service is operational 24 hours, 7 days a week. If 500 Internal Server errors occur, it may be due to too much traffic on the AI Model Hub or an urgent infrastructure fix. Please retry your request. If the problem persists, contact IONOS CLOUD Support.
Cost & Usage
How is usage measured?
Usage is measured per request, and the unit depends on the type of model.
For Large Language Models, Coding Models and OCR Models, usage is measured in tokens: the input tokens sent to the model and the output tokens it generates. Input covers everything sent as part of the request, and output everything the model produces in response.
Embedding Models and Reranking Models are measured on input tokens only, at a single rate rather than separate input and output rates. These models return vectors or relevance scores rather than generated text, so no output tokens arise. For a reranking request, the input counted is your query together with all the documents you submit.
Text to Image Models are not measured in tokens. Each model is billed according to its own unit, which varies by model. If a single request generates several images, each one counts separately. Where a model works from an existing image, for example to edit or vary it, the input image counts towards the request as well.
For the unit and the price that apply to each model, see Prices.
How are retries counted?
Each request is measured on its own. Attempts are not matched up or combined, so a retry counts separately from the attempt before it.
This is worth keeping in mind when an earlier attempt had already produced output, either because it was cut short after generation began or because your application rejected its response and reissued the request. That output counts too, alongside the retry. Retry logic configured in your client therefore has a direct effect on your total usage.
Is repeated or cached input discounted?
Not currently. Repeated input is measured at the standard input rate.
Prompt caching is applied automatically, so a request that repeats a long identical prefix may return faster than the first time it was sent. Billing does not yet reflect this: cached and new input tokens are counted alike, so a request is measured on its full input.
Do system prompts and tool definitions count as input?
Yes. A system prompt and any tool or function definitions you include travel to the model as part of your input, so they count as input tokens like the rest of your prompt. They are not measured separately, and they are not excluded from the count.
How can I monitor the costs incurred through usage of the AI Model Hub?
You can monitor your AI Model Hub costs and usage for your contract in the Cost & Usage section of the DCD. Usage data is broken down by model and unit to give you detailed insight into your consumption.
Prerequisites: You must be one of the following to access the Cost & Usage view:
Contract Type
Contract Users
Accessible?
Regular contracts
Contract administrators Contract owners
✅ ✅
Reseller contracts
Contract owners
✅
How can I retrieve my usage programmatically?
In addition to the DCD, you can retrieve your usage through the IONOS CLOUD Billing API and integrate it into your own reporting or cost-attribution tooling. For an overview of the API, see Cost & Usage.
The Utilization endpoints offer the most granular view of AI Model Hub consumption:
Utilization for the current billing period.
Utilization for one specified month, in
YYYY-MMformat.Utilization for one specified day, in
YYYY-MM-DDformat, for day-by-day analysis within a month.
Each returns metered quantities per product code, together with the unit that applies to that meter. Input and output have separate product codes for text generation, coding, and OCR models. Embedding and reranker models have a single product code. The Usage endpoints return aggregated totals for the current billing period, without the daily breakdown.
Last updated
Was this helpful?