Why Costr

Your AI bill is growing.
Your understanding of it isn’t.

Most teams track total AI spend in their billing dashboard. That number tells you nothing useful. Costr tells you which customers are expensive, which features drive the bill, and whether any of it is profitable.

What it is

A financial layer for your AI calls

Costr is a transparent proxy that sits between your app and your AI providers — OpenAI, Anthropic, and Google. Every API call passes through it unchanged. What Costr adds is attribution: it records how many tokens each call used, converts that to dollars using live pricing, and ties it back to the customer ID or feature tag you passed in the header.

No prompt content is stored. No model outputs are logged. Costr only sees token counts, model names, and the metadata you explicitly provide. Your data stays between you and your provider.

The result is a dashboard that answers the question every AI product team eventually hits: “Which of our customers is costing us the most — and are we making money on them?”

How it works

Three steps. One line of code.

Step 1

Point your SDK at Costr

Change baseURL in your OpenAI, Anthropic, or Google client to costr.dev/api/proxy/…. Your existing code keeps working — same models, same responses, same latency.

Step 2

Tag every call with a customer ID

Add an x-costr-user header with your customer’s ID. Optionally add x-costr-feature to track spend by product feature (e.g. “summarize”, “chat”).

Step 3

Open the dashboard

Your Customers page shows spend per customer, sorted by cost. Add revenue manually, via CSV, or by connecting Stripe — and Costr calculates gross margin on every row.

const openai = new OpenAI({
  baseURL: 'https://costr.dev/api/proxy/openai',
  defaultHeaders: {
    'x-costr-key': process.env.COSTR_KEY,
    'x-costr-user': customer.id,   // ← this is all Costr needs
  }
})

What you get

Every number you need to price your product right

Six views, all connected. From raw token counts to customer-level gross margin.

Per-customer spend

See exactly how many dollars each customer has cost you this month, which providers they're hitting, and whether their spend is trending up.

Revenue & gross margin

Add each customer's MRR manually, via CSV upload, or via Stripe sync. Costr subtracts their AI spend and shows you margin — positive or negative.

Feature-level breakdown

Tag calls with x-costr-feature ("chat", "summarize", "search"). See which features in your product are the most expensive to run.

Multi-provider in one ledger

OpenAI, Anthropic, and Google normalized to dollars. No switching between billing dashboards — one view across all three.

End-of-month projection

Based on daily run rate, Costr projects where your total spend will land by month-end — so you're not surprised on the 31st.

Zero prompt logging

Costr never stores prompt content or model responses. Only token counts, model names, and the metadata you explicitly send.

Privacy by design

We see token counts. Not your prompts.

Costr observes the shape of your AI traffic — model name, token usage, timestamp — and nothing else. Your prompts, your users’ messages, and model responses pass through the proxy but are never read, stored, or logged.

You pay your provider directly. Costr charges for the dashboard, not the inference. Your provider relationship, your keys, your data.

BYOK is required — you bring your own OpenAI, Anthropic, or Google key. Costr never holds a shared pool key, never marks up inference costs, and never blocks your calls if you hit a tracking cap. We see the bill shape; we don’t pay it.

Who it’s for

Built for teams who charge per customer

B2B SaaS founders
Understand AI cost at the customer tier level before your pricing breaks.
Engineering leads
Know which models and features are burning compute before your CFO asks.
Finance & ops
Finally get real cost-of-goods for AI-heavy products without reading code.
Indie developers
See if your $19/mo plan can actually support users who use AI heavily.

How we compare

Costr vs. the alternatives

Helicone and Langfuse are great observability tools. They’re not built for per-customer financial accounting.

FeatureCostrHeliconeLangfuseBuild it yourself
Per-customer spend attributionweeks of work
Revenue + gross margin per customermore weeks
Feature-level cost breakdownmanual tagging
OpenAI + Anthropic + Google in one view3× integrations
Zero prompt data storeddepends
End-of-month spend projection
Stripe revenue syncseparate build
One-line integration

Start knowing your numbers.

Free to start. No credit card. One line of code and your first attribution shows up in under a minute.