> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyone.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> Common error codes and solutions.

## Common errors

### 401 Unauthorized — invalid API key

```json theme={null}
{"error": {"message": "Invalid API key", "code": "invalid_api_key"}}
```

**Check:**

* Token was copied correctly (no extra spaces)
* Token has not been deleted or expired
* Request header format is correct: `Authorization: Bearer sk-xxxxx`

### 402 Payment Required — insufficient balance

```json theme={null}
{"error": {"message": "Insufficient quota", "code": "insufficient_quota"}}
```

**Solution:** Log in to the dashboard and top up your account.

### 404 Not Found — endpoint doesn't exist

**Check:**

* Base URL is correct: `https://api.anyone.ai/v1`
* Make sure you haven't added or omitted `/v1`

```python theme={null}
# ✅ Correct
base_url = "https://api.anyone.ai/v1"

# ❌ Wrong — this will result in /v1/v1/chat/completions
base_url = "https://api.anyone.ai/v1/"
```

### 429 Too Many Requests — request rate too high

**Solution:** Wait a few seconds and retry, or reduce your request rate. See [rate limits](/guides/rate-limiting) for details.

### 500 / 502 / 503 — server error

The upstream model may be temporarily unavailable.

**Solution:**

1. Wait a minute and retry
2. Try a different model
3. If the issue persists, contact support

## Base URL setup

Make sure your base URL is set correctly:

| Setting  | Value                                    |
| -------- | ---------------------------------------- |
| Base URL | `https://api.anyone.ai/v1`               |
| API Key  | The API key you created in the dashboard |

<Warning>
  The most common mistake is adding a trailing `/` to the base URL. Use `https://api.anyone.ai/v1`, not `https://api.anyone.ai/v1/`.
</Warning>

## Still stuck?

* Check the **Logs** page in the dashboard to see if your request reached Anyone
* Confirm that your network can access `api.anyone.ai`
* Contact support with your error details
