TL;DR (June 2026): Once AI coding went metered (Cursor caps, then GitHub Copilot's June 1 move to AI Credits), a whole stack of cost tooling appeared at four distinct layers: local meters (Codeburn), gateway and observability dashboards (PostHog AI-gateway usage), vendor billing APIs (GitHub AI Credits usage API), and usage-based billing platforms. Each answers a different question. Knowing which layer you actually need saves you from bolting a personal dashboard onto a team-billing problem, or the reverse.
Why a stack, and why now
Flat-rate AI coding hid cost entirely. That ended in mid-2026: Cursor capped usage, and on June 1 GitHub Copilot moved every developer to token-metered AI Credits (1 credit = $0.01). The moment spend became variable, tooling rushed in to make it visible - but at different altitudes, for different buyers. They are complementary layers, not competitors. Here is the map.
Layer 1 - Local meters (personal observability)
The closest-to-the-metal layer reads the session files your tools already write to disk. Codeburn is the breakout: npx codeburn breaks spend down by tool, model, and project across 31 tools, with nothing leaving your machine.
- Answers: where did MY tokens go this week, and where am I wasting them?
- Can't: roll up across a team, attribute to a customer, or bill anyone.
- Use when: the spender and the payer are the same person. See our deep-dive on local AI-spend meters.
Layer 2 - Gateway and observability dashboards (app-level)
If your app routes LLM calls through a gateway, or you run a product-analytics platform, cost tracking is increasingly a built-in surface. PostHog shipped an AI-gateway usage page in June - requests, tokens, and cost over 30 days, per project, with connect snippets. LLM gateways add token quotas and per-route cost control in the same spirit.
- Answers: what is my application spending on LLM calls, by route or feature?
- Can't: see spend that does not flow through the gateway (e.g. developers' IDE agents), or produce a customer invoice.
- Use when: your AI spend is application traffic you control and route.
Layer 3 - Vendor billing APIs (per-vendor totals)
Each vendor exposes its own usage data. GitHub added an ai_credits_used field to the Copilot usage metrics API in June; OpenAI and Anthropic have their own dashboards and usage endpoints.
- Answers: how much did each user or org spend on THIS vendor?
- Can't: break the total down by model/feature/project (GitHub's field is a per-user total), and it is one vendor at a time. Stitching five vendors into one view is on you. See tracking GitHub AI Credits for the specifics and the gaps.
- Use when: you need the authoritative dollar figure for one vendor's bill.
Layer 4 - Usage-based billing platforms (attribution + caps + invoicing)
The top layer is where the previous three stop. A billing platform captures usage with dimensions (model, project, customer, cost-center) at the point of use, enforces spend caps before an overrun, and turns metered usage into invoices across every vendor at once.
- Answers: who owes what, how do I cap runaway spend before the bill lands, and how do I invoice it?
- Can't: be replaced by a dashboard - observing spend is not the same as attributing, capping, and billing it.
- Use when: AI spend belongs to a team, customers, or a budget you are accountable for.
Where UsageBox fits: Layer 4. UsageBox meters usage-based AI spend per customer, per project, and per model across vendors, enforces real-time spend caps, and turns that usage into billing. Use Layers 1-3 to see your spend; reach for Layer 4 when that spend has to be attributed, capped, or invoiced.
The takeaway
The four layers are cumulative, not competing. A solo developer lives happily at Layer 1. An app team adds Layer 2. Anyone reconciling a vendor bill touches Layer 3. The jump to Layer 4 happens the day the spender and the payer are no longer the same entity. The common mistake in 2026 is reaching for the wrong layer - trying to bill customers from a local dashboard, or installing a billing platform to answer a one-laptop "where did my tokens go" question. Match the layer to the question.