See what your AI actually costs — then cap it before the call

Two ways in, no account. Scan local coding-agent logs, or put a local proxy in front of your APIs. Prompt bodies go to your provider — never to BurnLens Cloud.

$6.98 per accepted PR on this repository, measured 2026-08-16. 97 merged · 2 closed unmerged · $677 of agent spend over 30 days, with the failed attempts charged to the successes. A floor, not a ceiling — any model missing from the pricing tables counts as $0. Cost is attributed per repo: agent logs record which repo a session ran in, not which branch.

OpenAIAnthropicGoogleGroqMistralTogetherxAIDeepSeekAzure OpenAIAWS Bedrock
Terminal

The problem

Bills tell you the model, not the why.

Your invoice says gpt-4o: $4,287. It doesn't say which feature, team, or customer burned it. By the time you trace the spike, it's already on next month's card.

Alerts arrive after the damage.

A bad deploy, a runaway agent, or one abusive customer can trigger thousands of API calls before any dashboard turns red. You find out when you open the bill.

Every provider is a different silo.

OpenAI's usage page. Anthropic's console. Azure Cost Management. Bedrock CloudWatch. No unified view, no way to ask which feature is your biggest AI spend across all providers.

How it works

01 · Drop-in proxy

Set one env var. Done.

BurnLens runs a local proxy on :8420. Set OPENAI_BASE_URL or ANTHROPIC_BASE_URL and your existing SDK code routes through automatically. Designed for low overhead with full streaming passthrough.

02 · Tag what matters

Attribute any call to any dimension.

Three request headers — X-BurnLens-Tag-Feature, -Team, -Customer — attribute cost to any dimension you care about. Tags are stripped before the request reaches the AI provider. If you enable cloud sync, tag values are uploaded to your workspace alongside cost metadata — never prompt or response bodies.

03 · Cap before you call

429 before the upstream request, not after the bill.

Register an API key with a daily dollar limit. At 100%, BurnLens returns 429 before the call is forwarded upstream. 50% and 80% thresholds fire Slack or email alerts.

Budget enforcement semantics — exact behaviour under concurrency, streaming, retries, and unpriced models, with the implementing function cited for every claim.

04 · One dashboard

Every provider, unified.

OpenAI, Anthropic, Google, Groq, Mistral, Together, xAI, DeepSeek, Azure OpenAI, and AWS Bedrock spend in one view. Model breakdowns, waste detection, and budget tracking using versioned provider pricing.

Built for every AI use case

Coding agents: per-PR, per-dev attribution

Claude Code, Cursor, Codex, Gemini CLI — see cost per repo, developer, or PR. Hard daily caps per API key stop one runaway agent from burning the team's monthly budget overnight.

Scan retroactive history with one command →

Customer-facing AI: per-customer spend and controls

Tag each request with a customer ID. See which customers drive the most cost. Alert on per-customer budget thresholds and configure cheaper-model routing.

RAG and agents: see what justifies the cost

Tag retrieval calls, tool calls, and generation separately. See whether your vector search or synthesis step is the cost driver — and whether it justifies the output quality.

Internal tools: per-team budgets with exportable cost records

Set per-team monthly budgets, get Slack alerts at 80% and 100%, and export monthly records for comparison with provider invoices.

Beyond the dashboard

Semantic cache: skip the call, save the cost

BurnLens caches repeated prompts using exact match and cosine-similarity embedding search. Identical or near-identical queries are served from cache — the upstream API call never happens and you pay nothing.

Model recommendations: find the cheaper path

burnlens recommend analyses your usage and suggests cheaper model alternatives with confidence scores and projected savings. Switch from gpt-5.6-sol to gpt-5.6-terra where output tokens stay short.

Anomaly detection: catch runaways in real time

Sliding-window statistical analysis (MAD / Z-score) across 1-minute, 5-minute, 15-minute, and 1-hour windows. Cost spikes and runaway agent loops fire alerts before the damage compounds.

Automatic model routing: degrade gracefully

When a budget you set drops below 20% remaining (or $5), BurnLens routes requests to a cheaper model instead of hard-blocking with 429. Your app stays live — it just gets more cost-efficient.

On by default, and only ever active once you have set a budget. Every downgrade is logged; set routing.budget_downgrade: false to always receive the model you asked for.

Why BurnLens

BurnLensHelicone / LangfuseVantage / CloudZero
Open sourcePartial
Local-first (prompt bodies never pass through the vendor)
Hard caps before API call
Per-customer attribution
Multi-cloud (Azure / AWS / GCP)PartialPartial

Simple pricing

Free forever for individual developers. Pay only when your team needs cloud sync.

Free
$0/mo
  • Local proxy + dashboard
  • All 10 providers
  • Waste detection + recommendations
  • Budget alerts + anomaly detection
  • 7-day history · 10,000 records/mo
  • 1 API key · 1 seat
Install free
Teams
$99/mo
  • Everything in Cloud
  • Up to 10 seats
  • RBAC (owner/admin/viewer)
  • 365-day history
  • Audit log
Talk to sales
Enterprise
Custom
  • Everything in Teams
  • Unlimited seats
  • OTEL export
  • Custom pricing rules
  • 10-year retention
Contact Us

Up in 3 commands

$pip install burnlens
$burnlens scan
$burnlens top
#Claude Code, Cursor, Codex, Gemini CLI — no account

Production APIs: burnlens start, then point OPENAI_BASE_URL at http://127.0.0.1:8420/proxy/openai. Google needs burnlens.patch.patch_google().