BurnGuard is a single Go binary that sits quietly between your application and every AI provider you call. Every request passes through it — tokens are counted as they stream, costs are calculated immediately, and requests are blocked the instant your budget is exceeded. No dashboards to configure, no cloud agents to deploy, no 8-hour delay before the damage is done.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Verifieddanny/BurnGuard/llms.txt
Use this file to discover all available pages before exploring further.
The Problem
The tools that exist today were built for enterprises, not for indie developers and small teams running experiments at 2 AM. A developer set up AWS Cost Anomaly Detection with a 30,141 invoice** — Bedrock is billed through AWS Marketplace and the monitoring tool never saw it. Another developer woke up to an **7 budget cap. An attacker found a public API key, fired 60,000+ requests overnight, and blasted through nine safety features that were all turned off by default. Enterprise FinOps tools that catch this kind of runaway spend start at $6,000/year. AWS Budgets carries an 8–24 hour notification delay — long after the damage is done. For indie developers and small teams, nothing exists. BurnGuard fills that gap: a local reverse proxy with zero-latency enforcement, a single binary install, and no monthly fee.Key Features
Real-Time Token Counting
Tokens are counted as they flow through — including SSE streaming responses — not hours later in a billing report.
Hard Budget Caps
The
BudgetGuard middleware checks spend before every request. When the limit is hit, requests are blocked with HTTP 403 instantly — before they ever reach the provider.Multi-Provider Routing
Route to Anthropic or OpenAI using path prefixes. One proxy handles all your providers.
Slack & Discord Alerts
Get notified at 50%, 80%, and 100% of your budget via Slack and Discord webhooks. Each threshold fires exactly once per session.
SQLite Persistence
All usage is written to a local SQLite database. Budget enforcement survives restarts — totals are loaded from the database on startup.
Cloud Dashboard Sync
A background goroutine syncs usage data to burnguard.run every 60 seconds so you can view charts, model breakdowns, and recent requests in a web UI.
Architecture
BurnGuard is three independent programs connected by HTTP. Only the proxy runs on your machine — the backend and dashboard are optional cloud services hosted at burnguard.run.| Component | Tech | Purpose |
|---|---|---|
| Proxy | Go, SQLite | Runs locally; intercepts API calls, enforces budgets, syncs usage |
| Backend API | Go, PostgreSQL | Cloud service; stores synced usage data, serves the dashboard |
| Dashboard | Next.js, GSAP, Recharts | Web UI at burnguard.run for analytics and configuration |
Supported Providers
| Provider | Routing Path | Streaming | Cache-Aware Pricing |
|---|---|---|---|
| Anthropic (Claude) | /anthropic/v1/messages | ✓ | ✓ |
| OpenAI (GPT) | /openai/v1/chat/completions | ✓ | ✓ |
| Google (Gemini) | — | — | — |
Google Gemini support is coming soon. The provider entry exists in the codebase but is currently commented out pending pricing table integration.
Next Steps
Quickstart
Install the binary, run the setup wizard, and route your first request through BurnGuard in under five minutes.
How It Works
Dive into the request flow, token counting internals, budget enforcement middleware, and cloud sync implementation.
