Integrations
Two paths to capture
AtlasBurn captures AI usage through two complementary surfaces. Pick whichever fits your stack — both write to the same Forensic Ledger.
- SDK auto-detect (
@atlasburn/sdk) — JavaScript/TypeScript only. PatchesglobalThis.fetchand captures any call to a recognized provider host. Soft enforcement: limits are evaluated in-process. - Cloudflare Edge Proxy (
proxy.atlasburn.com) — language-agnostic. Point your client at/openai/,/anthropic/,/gemini/, or/openrouter/. This is the universal hard-enforcement path — guardrail kill flags are read from Cloudflare KV before traffic ever reaches the provider.
Priced vs. auto-captured
/api/ingest.Provider Matrix
| Provider | SDK auto-detect | Cloudflare proxy | Priced | Notes |
|---|---|---|---|---|
| OpenAI | Yes | /openai/ | Yes | Standard usage object. Streaming usage injected via stream_options.include_usage. |
| Anthropic | Yes | /anthropic/ | Yes | Standard usage object. |
| Google Gemini | Yes | /gemini/ | Yes | usageMetadata field. Watch for schema drift between API versions. |
| Google Vertex AI | Yes | via /gemini/ | Yes | Same wire format as Gemini. |
| OpenRouter | No | /openrouter/ | Yes | Use the proxy for capture. Tokenizer drift from upstream routing — Layer 4 RPS is the primary safety net. |
| Meta / Llama | No | Self-host | Yes | Priced in the registry. Capture via the proxy when fronting a Llama gateway; otherwise post events to /api/ingest manually. |
| Mistral | No | Self-host | Yes | Priced. Auto-detect not yet shipped — use the proxy or /api/ingest. |
| DeepSeek | No | Self-host | Yes | Priced. Auto-detect not yet shipped. |
| xAI | No | Self-host | Yes | Priced. Auto-detect not yet shipped. |
| Cohere | No | Self-host | Yes | Priced. Auto-detect not yet shipped. |
| Azure OpenAI | No | Not supported | No | Not yet supported. |
| AWS Bedrock | No | Not supported | No | Not yet supported. |
| Groq | No | Not supported | No | Not yet supported. |
| Together AI | No | Not supported | No | Not yet supported. |
How SDK auto-detect works
Auto-detect monkey-patches globalThis.fetch and inspects the request URL. When it matches a recognized provider host (OpenAI, Anthropic, Gemini, Vertex), it extracts usage metadata from the JSON or SSE response. No wrappers, no middleware.
Schema drift — Google
usageMetadata. If Gemini or Vertex token counts disappear after a provider update, upgrade @atlasburn/sdk.How the proxy works
The proxy is a Cloudflare Worker. It forwards to the upstream provider with the original auth header you passed, reads kill flags from Cloudflare KV synchronously, and emits one normalized telemetry event per request. Because enforcement happens at the edge, a tripped guardrail blocks traffic before the provider charges you.
Supported routes today: /openai/, /anthropic/, /gemini/, /openrouter/. See Proxy Quickstart.
Posting events manually
For any priced-but-not-auto-captured provider (Mistral, DeepSeek, xAI, Cohere, self-hosted Llama), POST normalized events directly to /api/ingest. See the API Reference.
Not yet supported
Azure OpenAI, AWS Bedrock, Groq, and Together AI are not yet supported by either the SDK or the proxy. They are not priced in the registry. Tracking them today requires posting normalized events to /api/ingest from your own server.
Next Steps
- SDK Integration — initialization and options
- Proxy Quickstart — universal capture in two lines
- Cost Engine — how pricing is resolved per provider