Proxy Gateway Troubleshooting

Common failures when routing AI traffic through https://proxy.atlasburn.com and how to fix them.

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.

StatusMeaningFix
401Missing AtlasBurn-API-Key headerAdd the header AtlasBurn-API-Key: abn_... (or x-atlasburn-key).
401ATLASBURN_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.
401ATLASBURN_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 minutesSwitch your app to the workspace's current key.
429ATLASBURN_KEY_RATE_LIMITED: many different invalid keys from your address within a minuteFix the key, then retry after the Retry-After time (60 seconds).
401 / 403Provider 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-....
403A 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.

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.

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.

ProviderSupportedNot 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 segmentValid model prefixesCommon mistake
/openaigpt-*, o1-*, text-embedding-*Sending claude-3-5-sonnet here
/anthropicclaude-*Sending gpt-4o here
/geminigemini-*Sending gpt-4o here

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, or contact [email protected] with the request ID returned in the x-atlasburn-request-id response header.