# Troubleshooting

This guide covers the most frequent problems encountered when using the <code class="expression">space.vars.ionos\_cloud\_ai\_model\_hub</code> and explains how to report issues effectively to our support team.

## Most frequent problems

### Authentication fails: Expired or invalid token

If API calls worked previously but now return `401 Unauthorized`, an expired authentication token is the most likely cause. A `401` response looks like this:

```
HTTP/2 401
date: Tue, 31 Mar 2026 13:03:38 GMT
...
x-trace-id: 1c44146207cb965bec4877905b6aa4fd
...

{"httpStatus":401,"messages":[{"errorCode":"paas-auth-1","message":"Unauthorized, wrong or no api key provided to process this request"}]}
```

{% hint style="warning" %}
**Check your token first.**

<code class="expression">space.vars.ionos\_cloud\_ai\_model\_hub</code> tokens expire after the time-to-live (TTL) you selected when generating them (between 1 hour and 365 days). This is the most common cause of sudden authentication failures.
{% endhint %}

**What a valid token looks like**

<code class="expression">space.vars.ionos\_cloud</code> authentication tokens are JSON Web Tokens (JWTs), long strings of three dot-separated Base64 segments. A valid token starts with `eyJ`:

```
eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ....<remaining characters>....Kwl42iMMD295Q
```

If the value you are using looks like a short UUID, for example `0e020fbc-caa7-4310-bbf1-85724e3bd4da`, it is **not** a valid authentication token. A UUID in this format is the **identifier of the token** as shown in the Token Manager, not the token value itself. Make sure you copy the token value, not its ID.

**How to check and renew your token**

1. Log in to the [<mark style="color:blue;">Data Center Designer (DCD)</mark>](https://dcd.ionos.com) with the user account you use for AI Model Hub access.
2. Click **Management** > **Token Manager**.
3. Review the list of tokens and their expiry dates. Note that the token values are not displayed here, the Token Manager only shows token metadata such as the creation date and TTL.
4. If your token is expired, click **Generate Token** to create a new one.
5. Select the **Time to Live (TTL)** for the new token and click **Generate Token**.
6. Copy the token value immediately. It is only shown once at creation and cannot be retrieved afterwards. If you missed copying it, generate a new token and update it in your application or environment variable.

For a full walkthrough of token generation, including how to set up users and access rights, see the [<mark style="color:blue;">Access Management</mark>](/cloud/ai/ai-model-hub/how-tos/access-management.md) guide.

## How to Report Issues to Support

When contacting <code class="expression">space.vars.ionos\_cloud</code> support about an AI Model Hub issue, always include the **response headers** from the failing request. The headers contain trace identifiers that allow our team to locate and analyze the exact request in our systems.

Two header values are especially important:

| Header             | Purpose                                                                                                                                |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| `x-trace-id`       | Uniquely identifies the request in our tracing system. This is the primary identifier our team needs to investigate.                   |
| `ionos-request-id` | Secondary request identifier, also used for correlation.                                                                               |
| `date`             | The exact timestamp of the request as recorded by the server. Helps our team locate the request in logs even if trace IDs are missing. |

**Example response headers from a failing request**

| Name                               | Value                               |
| ---------------------------------- | ----------------------------------- |
| `date`                             | Tue, 31 Mar 2026 12:30:02 GMT       |
| `content-type`                     | application/json; charset=utf-8     |
| `content-length`                   | 139                                 |
| `connection`                       | keep-alive                          |
| `ionos-request-id`                 | 3e0974edb862b8259d867afbdfec551b    |
| `strict-transport-security`        | max-age=31536000; includeSubDomains |
| `vary`                             | Origin                              |
| `x-content-type-options`           | nosniff                             |
| `x-frame-options`                  | DENY                                |
| `x-trace-id`                       | 1a937f5e732f9348aaa430e66ed8a05e    |
| `access-control-allow-credentials` | true                                |
| `access-control-allow-origin`      | \*                                  |

**How to capture headers and bodies**

{% tabs %}
{% tab title="curl" %}
Add the `-i` flag to include response headers in the output. The `-v` flag additionally prints the request headers:

```bash
curl -i -v -X POST https://openai.inference.de-txl.ionos.com/v1/chat/completions \
  -H "Authorization: Bearer ${IONOS_API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"model": "meta-llama/Meta-Llama-3.1-8B-Instruct", "messages": [{"role": "user", "content": "Hello"}]}'
```

The output includes request headers (`>`), response headers (`<`), and the response body. Copy the full output and include it in your support request.
{% endtab %}

{% tab title="Python" %}
The `requests` library exposes headers and bodies on both the request and response:

```python
import json
import requests

IONOS_API_TOKEN = "<YOUR_TOKEN_HERE>"
headers = {
    "Authorization": f"Bearer {IONOS_API_TOKEN}",
    "Content-Type": "application/json"
}
request_body = {
    "model": "meta-llama/Meta-Llama-3.1-8B-Instruct",
    "messages": [{"role": "user", "content": "Hello"}]
}

response = requests.post(
    "https://openai.inference.de-txl.ionos.com/v1/chat/completions",
    headers=headers,
    json=request_body
)

print("=== Request ===")
print("Body:", json.dumps(request_body, indent=2))

print("\n=== Response ===")
print("Status code:", response.status_code)
print("Headers:")
for name, value in response.headers.items():
    print(f"  {name}: {value}")
print("Body:", response.text)
```

Include the full printed output in your support request.
{% endtab %}
{% endtabs %}

{% hint style="info" %}
**What to include in a support request**

* The `x-trace-id`, `ionos-request-id`, and `date` values from the response headers
* The HTTP status code and response body
* The request body (the support team cannot see request or response bodies on their end)
* The endpoint you were calling and the operation you were performing
  {% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.ionos.com/cloud/ai/ai-model-hub/troubleshooting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
