Financial intelligence for AI
Per-customer AI spend attribution across OpenAI, Anthropic, and Google. One line of code.
BYOK required. Your provider, your bill. Costr never blocks your calls — we just track them.
import Anthropic from '@anthropic-ai/sdk' const client = new Anthropic({ baseURL: 'https://costr.dev/api/proxy/anthropic', defaultHeaders: { 'x-costr-key': process.env.COSTR_KEY, 'x-costr-user': customer.id, } })
Same 2-header swap for all providers. See the docs →
The fastest way to per-customer AI cost attribution.
One header change. Three providers in one ledger. Real-time dashboard that surfaces unprofitable customers before they erode your margin.
Costr is built for founders shipping AI in production who need to know where the money goes at the level of detail that decides pricing, retention, and runway.
Independent. Built for indies. Priced for indies. Zero markup on inference. Your keys, your bill.
Nobody on the team could tell which customer spent it. Costr breaks every dollar down by the user who triggered it — across OpenAI, Anthropic, and Google, in one ledger.
Pass an x-costr-user header on every proxy request. Costr attributes every token, every dollar, back to the customer in your product who triggered it. Sorted by spend. Unprofitable customers visible at a glance.
OpenAI, Anthropic, and Google in one ledger. Costr normalizes pricing across providers and tracks spend in dollars, regardless of which model your code calls.
Your API keys, your bill. Costr observes the traffic, never the content of your prompts or responses. You pay your provider directly — we charge for the dashboard, not the inference.
The whole picture
Total spend, trend over time, and provider mix — so you know what you’re paying, not just who’s costing it.
Total spend · this month
$4,847.20
↑ 23.4% vs. last month
across 247 customers · 1.2M tokens
Daily spend · last 30 days
By provider · this month
What you get
From raw token counts to per-customer gross margin — connected in one dashboard.
Every dollar attributed to the customer who triggered it. Sorted by spend. Exportable as CSV.
Add MRR per customer manually, by CSV, or via Stripe. Costr calculates net margin on every row.
Tag calls with x-costr-feature to see which parts of your product drive the bill.
OpenAI, Anthropic, and Google normalized to dollars. No switching dashboards.
I’m Brandon. I’m 18 and I built Costr solo because I hit the per-customer AI margin problem on my own product and couldn’t find a tool that solved it the way I needed. No team, no investors. Just shipping.
Email me directly: brandon@costr.dev
Free to start. Pro for indies. Team for teams. Enterprise for everyone else.
For trying things out.
For indie devs and small teams.
For growing B2B SaaS teams.
Scale-grade infrastructure.