Quickstart
Summary
Get AtlasBurn capturing telemetry in under 60 seconds. This guide covers installation, initialization, and verification.
System maturity: Stable
New in v1.5.0 — Universal Framework Support
Prerequisites
- An AtlasBurn account with an API key (generated in the Integration Protocol dashboard)
- Node.js, Vercel Edge, or a Chromium/WebKit browser runtime
- At least one auto-captured provider: OpenAI, Anthropic, Google Gemini, or Google Vertex AI. Other priced providers (Meta/Llama, Mistral, DeepSeek, xAI, Cohere, OpenRouter) use the Edge Proxy.
Step 1 — Install the SDK
npm install @atlasburn/sdkStep 2 — Set Your API Key
Generate an API key in your AtlasBurn dashboard under Integration Protocol. Store it as an environment variable:
ATLASBURN_KEY=abn_xxxxxxxxxxxxxxxxxxxxNever commit API keys
Step 3 — Initialize at Your Entry Point
Call initAtlasBurnAuto at the boot level of your application — beforeany LLM call is made. The correct location depends on your runtime:
Do NOT initialize in layout.tsx
layout.tsx is subject to React caching and does not reliably patch server-side route handlers. The only supported way to initialize in Next.js is via src/instrumentation.ts.Next.js (App Router) — required
Create an instrumentation.ts file in your src/ directory (or project root if not using src) and call initAtlasBurnAuto inside theregister() function:
import { initAtlasBurnAuto } from "@atlasburn/sdk";
export function register() {
if (process.env.ATLASBURN_KEY) {
initAtlasBurnAuto({
apiKey: process.env.ATLASBURN_KEY,
});
}
}Node.js / Express / other runtimes
Initialize at the very top of your entry file, before importing any AI provider libraries:
import { initAtlasBurnAuto } from "@atlasburn/sdk";
initAtlasBurnAuto({ apiKey: process.env.ATLASBURN_KEY });
import OpenAI from "openai"; // import providers AFTER initStep 4 — Configure Budget Guardrails
In your AtlasBurn dashboard, configure dailyBudgetUsd under Safety Guardrails. This sets the deterministic limit that triggers the Auto Kill protocol if breached.
Step 5 — Verify Telemetry
Make any LLM API call. Open your AtlasBurn Forensic Ledger. You should see a telemetry pulse within ~5–10 seconds (the SDK flushes batches every ~5s).
import OpenAI from "openai";
const openai = new OpenAI();
const response = await openai.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: "Hello" }],
});
// Check your Forensic Ledger — the call is already tracked.Or use this snippet to verify programmatically:
import { verifyAtlasBurn } from "@atlasburn/sdk";
await verifyAtlasBurn({
apiKey: process.env.ATLASBURN_KEY,
debug: true,
});Expected result
Minimal Integration Checklist
- Generate API key in AtlasBurn dashboard
- Call
initAtlasBurnAutoat the root entry point - Configure
dailyBudgetUsdin Safety Guardrails - Verify telemetry in Forensic Ledger
Notes
- The SDK is fire-and-forget — do not
awaitthe init call or it will add latency to your application - If telemetry doesn't appear, check the browser console for a
"Pulse Sent"log message - Auto-detect works by monkey-patching
globalThis.fetch— if you use a custom HTTP client or an unsupported provider, route through the Edge Proxy
Next Steps
- How It Works — understand the interception and data flow
- SDK Integration — Next.js instrumentation and auto-detect options
- Cost Engine — how pricing is calculated