Using Lamdy
Revenue and margins
Connect Stripe and attribute spend to customers and features to see what each one earns you.
Spend tells you what AI costs. Margin tells you whether it pays off. Lamdy puts the two side by side by reading your revenue from Stripe and splitting AI spend by customer and feature.
1. Connect Stripe
Revenue features are part of the Pro plan. Lamdy only ever uses a restricted, read-only key:
- In Stripe, open Developers, then API keys, and click Create restricted key. Name it “Lamdy”.
- Set Read on Charges, Customers, Invoices and Refunds. Leave everything else as None.
- Create it and paste the key (it starts with
rk_) on the Revenue page.
Lamdy imports the last 90 days of revenue and keeps it current with the same background syncs as your providers. A full secret key (sk_) is refused: Lamdy never needs to write to Stripe.
2. Split spend by customer and feature
A provider bill shows which API key, project or model spent the money, not which of your customers or features it was for. Attribution rules bridge that gap without code changes:
- Match on an API key, project or workspace, or model.
- Assign the matching spend to a customer, feature or team.
For example: “API key acme-prod → customer Acme Corp”, or “model claude-haiku-4-5 → feature Support chat”. Rules apply to past and future spend, so you see results straight away.
3. Read your margins
- Customers: each customer's revenue, the AI cost they drive, and their gross margin, worst first, so the accounts that cost more than they pay stand out.
- Features: cost, trend and margin per feature.
- Revenue: revenue over time next to total AI spend.
If your customers all share one API key, provider billing can't tell them apart. Send usage from your app instead, and Lamdy splits the cost per customer and feature: Send usage per customer.