Introduction

What Margint is, what it's not, and when to reach for it.

Margint is a lightweight SDK and dashboard that attributes per-customer LLM spend to your billing revenue. It answers one question:

Which of my customers actually make me money?

It's built for teams running AI-native SaaS who already know — or suspect — that their gross margin is nowhere near what traditional SaaS charts promise, but can't see which customers are the reason.

What Margint does

  • Tracks every LLM call tagged with a customer ID, feature name, model, and token counts.
  • Calculates cost locally using a pricing database mirrored from LiteLLM (400+ models).
  • Syncs MRR per customer from Stripe and computes margin per customer per month.
  • Enforces budget caps at the SDK level with guardedCall() / guarded_call().
  • Sends email alerts when a customer's margin drops below a threshold you set.
  • Exposes a public REST API and MCP server so agents, scripts, and IDEs can read margin too.

What Margint is not

  • Not an LLM proxy or gateway. We never sit between your app and the provider. The SDK sends metadata after each call — zero added latency.
  • Not an observability tool. No tracing, no eval runs, no prompt debugging. Langfuse, Braintrust, and Helicone are great for that — we complement them, we don't replace them.
  • Not a billing platform. We read Stripe data. We don't generate invoices or charge your customers.

When to use it

You have an AI-native SaaS in production, you're billing $X/month per customer, and you can't answer "what was my gross margin on customer Y last month" without a spreadsheet and a frustrated afternoon.

If you're still in prototype phase, install it anyway — you'll thank yourself when one beta user decides to run your agent feature 10,000 times in a weekend.

Next steps