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 — Header issues

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).

StatusMeaningFix
401Missing or invalid AtlasBurn-API-KeyAdd header AtlasBurn-API-Key: abn_.... Verify the key in your dashboard.
401Provider key missing/invalidOpenAI/Gemini: Authorization: Bearer sk-.... Anthropic: x-api-key: sk-ant-....
403AtlasBurn key valid, but blocked by Auto Kill ProtocolCheck budget in dashboard. Raise limit or wait for the budget window to reset.
403Project key used in wrong environmentProduction keys cannot be used from localhost if the project enforces env restrictions.

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 providerhttp
# 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 contact@atlasburn.com with the request ID returned in the x-atlasburn-request-id response header.