AtlasBurn Edge Proxy

Zero-code, zero-latency observability and enforcement

The AtlasBurn Edge Proxy is a Cloudflare Worker that sits between your application and the AI provider (OpenAI, Anthropic, OpenRouter). It captures telemetry, enforces autonomous guardrails, and fails open by design — your app never crashes because of the proxy.

What it is

A stateless Cloudflare Worker deployed at the edge. It transparently forwards your AI requests to the upstream provider while reading kill flags from a global GUARDRAIL_FLAGS KV namespace on every request. If your organization has breached a guardrail, the proxy returns a 429 immediately — at the edge, before the provider is ever called.

Benefits over the SDK

  • Zero code changes — swap one base URL. No npm install, no monkey-patching.
  • Language-agnostic — works for Python, Go, Rust, Ruby, .NET, n8n, Zapier, LangChain, anything that speaks HTTP.
  • Native SSE streaming — streams pass through unmodified with token usage extracted from the final frame.
  • Server-side enforcement — guardrails are enforced before the request leaves your edge, not after the bill arrives.
  • Fails open (Law 4) — if AtlasBurn is unreachable, the proxy still forwards the request. Never crash the proxy.

Setup

The hosted proxy at proxy.atlasburn.com works out of the box — no deployment required. For self-hosting (e.g. compliance, custom regions), deploy the worker yourself:

  1. Initialize — from the atlasburn-proxy folder, run npx wrangler deploy.
  2. Create the KV namespace — npx wrangler kv namespace create GUARDRAIL_FLAGS.
  3. Bind the namespace — paste the returned id into wrangler.toml under [[kv_namespaces]] with the binding name GUARDRAIL_FLAGS, then redeploy.
wrangler.toml
toml
name = "atlasburn-edge-proxy"
main = "src/index.ts"
compatibility_date = "2026-01-01"

[[kv_namespaces]]
binding = "GUARDRAIL_FLAGS"
id = "<your-kv-namespace-id>"

[vars]
ATLASBURN_INGEST_URL = "https://api.atlasburn.com/api/ingest"
Deploy
bash
# 1. Initial deploy
npx wrangler deploy

# 2. Create the KV namespace
npx wrangler kv namespace create GUARDRAIL_FLAGS

# 3. Paste the returned id into wrangler.toml under [[kv_namespaces]]

# 4. Redeploy with the binding active
npx wrangler deploy

Routing client traffic through the proxy

Swap the base URL on your existing AI client and append the AtlasBurn-API-Key header. Pick your setup — the provider's SDK, a raw HTTP call in any language, a framework, or a no-code tool. No SDK install required for the HTTP and no-code paths.

Provider
Language
OpenAI · cURL
bash
curl https://proxy.atlasburn.com/openai/v1/chat/completions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "AtlasBurn-API-Key: $ATLASBURN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-4o-mini",
  "messages": [
    {
      "role": "user",
      "content": "Hello from AtlasBurn"
    }
  ]
}'

Only two things change from a direct call: the base URL points at proxy.atlasburn.com/… and you add the AtlasBurn-API-Key header. Your provider key is forwarded untouched. Streaming works too — set stream: true and SSE frames pass through.

Supported Providers

  • OpenAI — https://proxy.atlasburn.com/openai/v1
  • Anthropic — https://proxy.atlasburn.com/anthropic/v1
  • Google Gemini — https://proxy.atlasburn.com/gemini/v1beta
  • OpenRouter — https://proxy.atlasburn.com/openrouter/v1
  • Cohere — https://proxy.atlasburn.com/cohere/v1
  • Mistral — https://proxy.atlasburn.com/mistral/v1
  • Groq — https://proxy.atlasburn.com/groq/openai/v1
  • Together AI — https://proxy.atlasburn.com/together/v1
  • DeepSeek — https://proxy.atlasburn.com/deepseek/v1
  • xAI (Grok) — https://proxy.atlasburn.com/xai/v1

OpenRouter caveat

OpenRouter load-balances across providers, which can cause tokenizer fluctuations (e.g. 24 vs 48 tokens for the same prompt). Layer 2 (Exact Match) works reliably for OpenAI and Anthropic; for OpenRouter, rely on Layer 4 (RPS Burst Protection) as the ultimate safety net. See Autonomous Runtime Guardrails.

Next Steps