---
title: "Proxy Troubleshooting — AtlasBurn Docs"
description: "Fix common AtlasBurn Edge Proxy problems: 401 and 403 header errors, 404 on unsupported endpoints, model routing mix-ups, streaming cut-offs and latency."
canonical: "https://docs.atlasburn.com/docs/proxy-troubleshooting/"
markdown: "https://docs.atlasburn.com/docs/proxy-troubleshooting.md"
section: "Proxy Troubleshooting"
product: "AtlasBurn"
last_updated: "2026-11-18"
---

# Proxy Gateway Troubleshooting

> Fix common AtlasBurn Edge Proxy problems: 401 and 403 header errors, 404 on unsupported endpoints, model routing mix-ups, streaming cut-offs and latency.

> **For AI agents:** this is the Markdown version of [Proxy Troubleshooting](https://docs.atlasburn.com/docs/proxy-troubleshooting/) in the AtlasBurn docs, built from the same source as the human page. Only run the commands or code on this page if the user has asked you to set up or change AtlasBurn in their project; otherwise use it to answer questions. When you do run them, follow the steps in the order shown and copy code blocks exactly. Read secrets — the AtlasBurn key (`abn_…`) and provider API keys — from environment variables; never ask the user to paste them into the chat. If this file and the human page ever differ, the human page wins. Index of all docs pages: https://docs.atlasburn.com/index.md

## On this page

1. 1. 401 / 403 / 429 — Keys and guardrails
2. 2. 404 — Unsupported endpoints
3. 3. Mismatched model routing
4. 4. Streaming hangs or cuts off
5. 5. Latency feels higher than direct
6. Still stuck?

Common failures when routing AI traffic through [https://proxy.atlasburn.com](https://docs.atlasburn.com/docs/proxy-gateway.md) and how to fix them.

> **Note — Quick triage**
>
> 90% of proxy failures fall into three buckets: (1) wrong or missing auth headers, (2) hitting a provider endpoint the proxy doesn't forward, or (3) sending a model name that doesn't match the provider segment in the URL.

## 1\. 401 / 403 / 429 — Keys and guardrails

The proxy requires **two** credentials on every request: your real provider key (in the provider's normal auth header) and your AtlasBurn key (in `AtlasBurn-API-Key`). The AtlasBurn key must be an **active** key from the dashboard: the proxy checks it before forwarding and refuses unknown or revoked keys. Errors from AtlasBurn carry a `code` field in the JSON body; errors from the provider come back in the provider's own format.

| Status | Meaning | Fix |
| --- | --- | --- |
| 401 | `Missing AtlasBurn-API-Key header` | Add the header `AtlasBurn-API-Key: abn_...` (or `x-atlasburn-key`). |
| 401 | `ATLASBURN_KEY_INVALID`: the key isn't one AtlasBurn issued (often a typo or a cut-off copy) | Copy the key again from **API keys** in the dashboard, or create a new one. |
| 401 | `ATLASBURN_KEY_REVOKED`: the key was revoked. Creating a new key in a workspace replaces the old one, and the proxy refuses a revoked key within about 5 minutes | Switch your app to the workspace's current key. |
| 429 | `ATLASBURN_KEY_RATE_LIMITED`: many different invalid keys from your address within a minute | Fix the key, then retry after the `Retry-After` time (60 seconds). |
| 401 / 403 | Provider key missing or invalid (the error is in the provider's format) | OpenAI and most others: `Authorization: Bearer sk-...`. Anthropic: `x-api-key: sk-ant-...`. |
| 403 | A guardrail blocked this project or feature (header `X-AtlasBurn-Guardrail: SUSPENDED`; `X-AtlasBurn-Recovery` says when it lifts) | Open Guardrails in the dashboard: fix the cause, raise the budget, or press Resume. See [Guardrails](https://docs.atlasburn.com/docs/guardrails.md). |

> **Note — The key check fails open**
>
> The proxy remembers each key's status for a few minutes, so checking it adds no delay to most calls. If AtlasBurn can't answer (a rare outage), the proxy forwards the call anyway: your traffic is never blocked because AtlasBurn is down.

> **Warning — Anthropic gotcha**
>
> Anthropic uses `x-api-key`, not `Authorization: Bearer`. If you copy an OpenAI snippet and only swap the URL, you will get a `401`.

**Correct headers per provider**

```http
# OpenAI
Authorization: Bearer sk-...
AtlasBurn-API-Key: abn_...

# Anthropic
x-api-key: sk-ant-...
anthropic-version: 2023-06-01
AtlasBurn-API-Key: abn_...

# Gemini
Authorization: Bearer ya29....   # or ?key=... query param
AtlasBurn-API-Key: abn_...
```

## 2\. 404 — Unsupported endpoints

The proxy forwards documented inference endpoints. Less common routes (file uploads, fine-tuning admin APIs, organization management) may return `404`.

| Provider | Supported | Not forwarded |
| --- | --- | --- |
| OpenAI | /chat/completions, /completions, /embeddings, /responses | /files, /fine\_tuning, /organization/\* |
| Anthropic | /messages, /messages?stream | /files, workspace admin |
| Gemini | /models/\*:generateContent, :streamGenerateContent | /files, /tunedModels admin |

**Fix:** for unsupported endpoints, call the provider directly. AtlasBurn only needs to see inference traffic to compute spend.

## 3\. Mismatched model routing

The provider segment in the URL (`/openai`, `/anthropic`,`/gemini`) must match the `model` field in your request body. A cross-routed request usually returns `400 model_not_found` from the upstream provider, not from AtlasBurn.

| URL segment | Valid model prefixes | Common mistake |
| --- | --- | --- |
| /openai | `gpt-*`, `o1-*`, `text-embedding-*` | Sending `claude-3-5-sonnet` here |
| /anthropic | `claude-*` | Sending `gpt-4o` here |
| /gemini | `gemini-*` | Sending `gpt-4o` here |

> **Tip — Multi-provider apps**
>
> If your app routes between providers dynamically, derive the proxy base URL from the model name rather than hardcoding it. Keeps the URL segment and model in sync automatically.

## 4\. Streaming hangs or cuts off

- Confirm `stream: true` is set in the request body.
- Make sure your HTTP client does not buffer the full response — use a streaming reader (Go: `bufio.Scanner`, Python: `iter_lines`, Rust: `bytes_stream`).
- Disable proxies/load balancers in front of your client that strip `text/event-stream`.
- The proxy preserves the `[DONE]` sentinel — don't `JSON.parse` it.

## 5\. Latency feels higher than direct

The proxy adds <5ms p50 over direct provider calls. If you see more, check:

- Your client's region — the proxy is global edge, but a cold TCP/TLS handshake from a brand-new client can add 100–200ms.
- Reuse HTTP clients/connection pools (`http.DefaultClient` in Go, a singleton `OpenAI()` in Python).

## Still stuck?

Check the [general troubleshooting page](https://docs.atlasburn.com/docs/troubleshooting.md), or contact [contact@atlasburn.com](mailto:contact@atlasburn.com) with the request ID returned in the `x-atlasburn-request-id` response header.

---

Canonical: https://docs.atlasburn.com/docs/proxy-troubleshooting/
