# Troubleshooting > Symptom-first index — find what you are seeing and jump to the cause. _Source: https://aiprimetech.io/docs/guides/troubleshooting/ · Home > Docs > Working with the API_ ## Nothing works at all Establish the baseline before debugging anything else: ```bash curl -s -o /dev/null -w "%{http_code}\n" https://aiprimetech.io/v1/models \ -H "Authorization: Bearer $CLAUDEAPIKEY" ``` `200` means the URL and key are both fine and the problem is in your client. Anything else is covered below. ## By symptom | Symptom | Likely cause | Fix | |---|---|---| | `404` on every call | Base URL has the wrong `/v1` handling | [Base URLs](/docs/getting-started/base-urls/) | | `401` with a key you just created | Wrong header for the format, or a trailing space | [Authentication](/docs/getting-started/authentication/) | | `402` | No credits, or plan expired | [Top up](/topup/) · [Plans](/plans/) | | `400 max_tokens` | Messages requires `max_tokens`; Chat Completions does not | [Messages](/docs/api-reference/messages/) | | `model_not_found` | Display name used instead of an api id | [Models endpoint](/docs/api-reference/models-endpoint/) | | Streaming connects but yields nothing | Parsing the other format's event shape | [Streaming](/docs/api-reference/streaming/) | | Reply cut off mid-sentence | `stop_reason: max_tokens` | Raise `max_tokens` | | Works in curl, fails in the SDK | SDK appends its own path to your base URL | [Base URLs](/docs/getting-started/base-urls/) | | Usage not showing in dashboard | Requests going to a different key or endpoint | Check `ANTHROPIC_API_KEY` is unset — [Claude Code](/docs/guides/claude-code/) | | Frequent `429` | Agent parallelism too high | [Rate limits](/docs/api-reference/rate-limits/) | | Bill higher than expected | Context growth across turns | [Context management](/docs/guides/context-management/) | ## Reading the error body The status code tells you the class of problem; the `error.type` and `error.message` fields tell you which one. Log the whole body — a `400` with `"missing max_tokens"` and a `400` with `"invalid role"` need completely different fixes. ## Still stuck Contact [support@claudeapikey.dev](mailto:support@claudeapikey.dev) with the endpoint, the model id, the status code and the error body. Never include your API key — if you already pasted it somewhere, revoke it first. - [Errors](https://aiprimetech.io/docs/api-reference/errors/) — Status code reference - [Base URLs](https://aiprimetech.io/docs/getting-started/base-urls/) — The most common fault - [API key configuration](https://aiprimetech.io/docs/guides/api-key-configuration/) — Per-tool settings --- _ClaudeAPIKey.dev is an independently operated, Anthropic-compatible API gateway. Not affiliated with Anthropic._