Proxy Gateway Troubleshooting
Common failures when routing AI traffic through https://proxy.atlasburn.com and how to fix them.
Quick triage
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).
| Status | Meaning | Fix |
|---|---|---|
| 401 | Missing or invalid AtlasBurn-API-Key | Add header AtlasBurn-API-Key: abn_.... Verify the key in your dashboard. |
| 401 | Provider key missing/invalid | OpenAI/Gemini: Authorization: Bearer sk-.... Anthropic: x-api-key: sk-ant-.... |
| 403 | AtlasBurn key valid, but blocked by Auto Kill Protocol | Check budget in dashboard. Raise limit or wait for the budget window to reset. |
| 403 | Project key used in wrong environment | Production keys cannot be used from localhost if the project enforces env restrictions. |
Anthropic gotcha
x-api-key, not Authorization: Bearer. If you copy an OpenAI snippet and only swap the URL, you will get a 401.# 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 |
Multi-provider apps
4. Streaming hangs or cuts off
- Confirm
stream: trueis 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'tJSON.parseit.
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.DefaultClientin Go, a singletonOpenAI()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.