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
| Customer | AI cost | Margin | |
|---|---|---|---|
| cus_8fK2… | $64.10 | −121% | Cap |
| cus_Q1xa… | $52.80 | −8% | Cap |
| cus_3mPz… | $18.40 | 81% | |
| cus_Lr7d… | $2.15 | 93% | |
| cus_Wb0e… | $0.88 | 97% |
One line around the SDK you already use.
track(new OpenAI(), { customerId: stripeId, feature: "summarize", })
Read-only access. We pull revenue per customer and touch nothing else.
Revenue, AI cost and margin for every customer. Money-losers sorted to the top.
Revenue minus AI cost for every Stripe customer, with a 30-day trend.
See which feature eats the budget: "summarize", "chat", that agent loop.
Slack or email when a customer's AI cost passes X% of what they pay, or spikes 3× overnight.
canSpend(customerId) returns allow, warn or block, so one runaway loop can't eat your month.
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.
First 50 people only. Charged today, fully refunded on request any time before launch. Launching soon.
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.)
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.
No. MarginCap is built for flat and per-seat pricing, which is exactly where power users hide.
You still get cost per customer and hard caps. A CSV revenue import is coming soon.
A solo developer. Questions? hello@margincap.dev
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 →