[{"data":1,"prerenderedAt":227},["ShallowReactive",2],{"navigation":3,"\u002Fdocs\u002Fgetting-started":54,"\u002Fdocs\u002Fgetting-started-surround":223},[4,16,32,47],{"title":5,"path":6,"stem":7,"children":8,"icon":10},"Introduction","\u002Fdocs\u002Fgetting-started","1.docs\u002F1.getting-started\u002F1.index",[9,11],{"title":5,"path":6,"stem":7,"icon":10},"i-lucide-house",{"title":12,"path":13,"stem":14,"icon":15},"Quickstart","\u002Fdocs\u002Fgetting-started\u002Fquickstart","1.docs\u002F1.getting-started\u002F2.quickstart","i-lucide-rocket",{"title":17,"path":18,"stem":19,"children":20,"page":31},"Sdk","\u002Fdocs\u002Fsdk","1.docs\u002F2.sdk",[21,26],{"title":22,"path":23,"stem":24,"icon":25},"TypeScript SDK","\u002Fdocs\u002Fsdk\u002Ftypescript","1.docs\u002F2.sdk\u002F1.typescript","i-simple-icons-typescript",{"title":27,"path":28,"stem":29,"icon":30},"Python SDK","\u002Fdocs\u002Fsdk\u002Fpython","1.docs\u002F2.sdk\u002F2.python","i-simple-icons-python",false,{"title":33,"path":34,"stem":35,"children":36,"page":31},"Concepts","\u002Fdocs\u002Fconcepts","1.docs\u002F3.concepts",[37,42],{"title":38,"path":39,"stem":40,"icon":41},"Pricing database","\u002Fdocs\u002Fconcepts\u002Fpricing-database","1.docs\u002F3.concepts\u002F1.pricing-database","i-lucide-database",{"title":43,"path":44,"stem":45,"icon":46},"Budget guard","\u002Fdocs\u002Fconcepts\u002Fbudgets","1.docs\u002F3.concepts\u002F2.budgets","i-lucide-shield",{"title":48,"path":49,"stem":50,"children":51,"icon":53},"API & MCP","\u002Fdocs\u002Fapi-and-mcp","1.docs\u002F4.api-and-mcp\u002F1.index",[52],{"title":48,"path":49,"stem":50,"icon":53},"i-lucide-plug-zap",{"id":55,"title":5,"body":56,"description":217,"extension":218,"meta":219,"navigation":220,"path":6,"seo":221,"stem":7,"__hash__":222},"docs\u002F1.docs\u002F1.getting-started\u002F1.index.md",{"type":57,"value":58,"toc":209},"minimark",[59,63,69,72,77,116,120,168,172,175,178,182],[60,61,62],"p",{},"Margint is a lightweight SDK and dashboard that attributes per-customer LLM spend to your billing revenue. It answers one question:",[64,65,66],"blockquote",{},[60,67,68],{},"Which of my customers actually make me money?",[60,70,71],{},"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.",[73,74,76],"h2",{"id":75},"what-margint-does","What Margint does",[78,79,80,84,95,98,110,113],"ul",{},[81,82,83],"li",{},"Tracks every LLM call tagged with a customer ID, feature name, model, and token counts.",[81,85,86,87,94],{},"Calculates cost locally using a pricing database mirrored from ",[88,89,93],"a",{"href":90,"rel":91},"https:\u002F\u002Fgithub.com\u002FBerriAI\u002Flitellm",[92],"nofollow","LiteLLM"," (400+ models).",[81,96,97],{},"Syncs MRR per customer from Stripe and computes margin per customer per month.",[81,99,100,101,105,106,109],{},"Enforces budget caps at the SDK level with ",[102,103,104],"code",{},"guardedCall()"," \u002F ",[102,107,108],{},"guarded_call()",".",[81,111,112],{},"Sends email alerts when a customer's margin drops below a threshold you set.",[81,114,115],{},"Exposes a public REST API and MCP server so agents, scripts, and IDEs can read margin too.",[73,117,119],{"id":118},"what-margint-is-not","What Margint is not",[78,121,122,134,158],{},[81,123,124,128,129,133],{},[125,126,127],"strong",{},"Not an LLM proxy or gateway."," We never sit between your app and the provider. The SDK sends metadata ",[130,131,132],"em",{},"after"," each call — zero added latency.",[81,135,136,139,140,145,146,151,152,157],{},[125,137,138],{},"Not an observability tool."," No tracing, no eval runs, no prompt debugging. ",[88,141,144],{"href":142,"rel":143},"https:\u002F\u002Flangfuse.com",[92],"Langfuse",", ",[88,147,150],{"href":148,"rel":149},"https:\u002F\u002Fbraintrust.dev",[92],"Braintrust",", and ",[88,153,156],{"href":154,"rel":155},"https:\u002F\u002Fhelicone.ai",[92],"Helicone"," are great for that — we complement them, we don't replace them.",[81,159,160,163,164,167],{},[125,161,162],{},"Not a billing platform."," We ",[130,165,166],{},"read"," Stripe data. We don't generate invoices or charge your customers.",[73,169,171],{"id":170},"when-to-use-it","When to use it",[60,173,174],{},"You have an AI-native SaaS in production, you're billing $X\u002Fmonth per customer, and you can't answer \"what was my gross margin on customer Y last month\" without a spreadsheet and a frustrated afternoon.",[60,176,177],{},"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.",[73,179,181],{"id":180},"next-steps","Next steps",[78,183,184,189,194,199,204],{},[81,185,186,188],{},[88,187,12],{"href":13}," — install the SDK and see your first event",[81,190,191],{},[88,192,193],{"href":23},"TypeScript SDK reference",[81,195,196],{},[88,197,198],{"href":28},"Python SDK reference",[81,200,201,203],{},[88,202,48],{"href":49}," — read margin from your agents and scripts",[81,205,206],{},[88,207,208],{"href":39},"How pricing is calculated",{"title":210,"searchDepth":211,"depth":211,"links":212},"",2,[213,214,215,216],{"id":75,"depth":211,"text":76},{"id":118,"depth":211,"text":119},{"id":170,"depth":211,"text":171},{"id":180,"depth":211,"text":181},"What Margint is, what it's not, and when to reach for it.","md",{},{"icon":10},{"title":5,"description":217},"8WZKZ4JoBrcFOO4W_Y330iIeeab3njDUzvl9KAEHb1g",[224,225],null,{"title":12,"path":13,"stem":14,"description":226,"icon":15,"children":-1},"From signup to first event in the dashboard — under three minutes.",1777838731206]