Margin per customer for AI SaaS

Find the customers your AI features are losing you money on.

MarginCap joins your LLM spend with your Stripe revenue, so you see each customer's margin and can cap the ones draining you. 5-minute setup. Never sees your prompts.

Works with OpenAI, Anthropic, OpenRouter & Gemini · TypeScript first, Python next

You charge $29 a month. One customer just cost you $64 in tokens. Your OpenAI dashboard can't tell you who.
How it works

Three steps. About five minutes.

01

Wrap your client

One line around the SDK you already use.

track(new OpenAI(), {
  customerId: stripeId,
  feature: "summarize",
})
02

Connect Stripe

Read-only access. We pull revenue per customer and touch nothing else.

03

See your margin table

Revenue, AI cost and margin for every customer. Money-losers sorted to the top.

What you get

Know who's profitable. Stop who isn't.

Margin per customer

Revenue minus AI cost for every Stripe customer, with a 30-day trend.

Cost per feature

See which feature eats the budget: "summarize", "chat", that agent loop.

Alerts

Slack or email when a customer's AI cost passes X% of what they pay, or spikes 3× overnight.

Hard caps

canSpend(customerId) returns allow, warn or block, so one runaway loop can't eat your month.

Privacy

We never see your prompts or completions.

The SDK sends token counts, model, customer ID and feature tag. Nothing else. It runs async, outside your request path, so it can't slow down or break your app.

{ "customer": "cus_8fK2…", "feature": "summarize", "model": "gpt-…", "input_tokens": 1840, "output_tokens": 412, "cached_tokens": 1200 } "prompt" "completion" ↑ never sent
Pricing

Priced for founders, not FinOps teams.

Free

$0
  • 50k events / month
  • Cost per customer

Startup

$79/mo
  • 10M events / month
  • Hard caps
  • Slack alerts
  • Cost per feature

Founding member: $19/mo on Indie, locked for life

First 50 people only. Charged today, fully refunded on request any time before launch. Launching soon.

Pre-order for $19 →
FAQ

Questions

How is this different from Langfuse or Helicone?

They're observability tools. They show what a user cost, but they don't know what that user pays you. MarginCap joins the two and gives you margin. (Helicone has been in maintenance mode since its acquisition. If you're on it, we'll help you switch.)

Can't Stripe's token billing do this?

Stripe token billing helps you charge customers for tokens. If you're on flat or per-seat pricing, like most of us, it doesn't show which customers you're losing money on.

Do I need usage-based pricing?

No. MarginCap is built for flat and per-seat pricing, which is exactly where power users hide.

What if I don't use Stripe?

You still get cost per customer and hard caps. A CSV revenue import is coming soon.

Who's building this?

A solo developer. Questions? hello@margincap.dev

Stop guessing which customers are profitable.

Join the early-access list. One email when it's ready, no spam.

Want to lock in $19/mo for life? Pre-order a founding spot →