Track AI spend.
Stay on budget.
Track AI API spend by customer and feature.
Get limit alerts and stop over-budget calls. No proxy required.
No credit card required
MarginDash
Revenue vs Cost Over Time
Revenue Cost
Built for real cost control, not just reporting
Works across OpenAI, Anthropic, Google Gemini, AWS Bedrock, Azure, Groq, and more.
Architecture
Budget guard architecture
Your app still calls providers directly. MarginDash provides the budget state control plane, and the SDK enforces decisions at call time.
Runtime data
Usage context from your app
Your app sends model/token usage plus customer and feature IDs. Prompts and completions stay in your stack.
Control plane
Budget state from MarginDash
SDK polls a lightweight blocklist endpoint with TTL/version caching.
Enforcement path
SDK verdict before provider request
Wrap calls with guardedCall. If a customer or feature budget is exceeded, the SDK blocks the request.
Go live in three steps
1
Set budgets in dashboard
Create org-wide, feature, and per-customer budgets.
2
Add one package
npm install ai-cost-calc
Also available as pip install ai-cost-calc or use the REST API
3
Guard AI calls and track usage
Wrap AI calls with guardedCall. If a call is over budget, it is blocked before the provider request is sent.
const response = await md.guardedCall({
customerId: user.id,
eventType: "summarize"
}, () => providerCall());
md.addUsage({
model: response.model,
inputTokens: response.usage?.prompt_tokens,
outputTokens: response.usage?.completion_tokens,
});
md.track({
customerId: user.id,
eventType: "summarize",
revenueAmountInCents: 499 // optional
});
Core capabilities for spend control
Budgets, blocking, revenue correlation, and current model pricing in one workflow.
Budgets
Per-customer and per-feature budgets
Define limits by customer or feature and monitor utilization continuously.
Revenue
Revenue tracking
Connect Stripe, or pass revenueAmountInCents via SDK events. Works with any billing system.
Pricing
Auto-updated pricing
Provider pricing syncs daily across 400+ models so cost calculations stay current.
Enforcement
Budget guard (SDK sidecar)
Use SDK guard methods to block over-budget calls without rerouting traffic through MarginDash.
Margin reporting
See customer profitability when you need it
If you connect revenue, MarginDash shows cost, revenue, and margin per customer so engineering and finance share the same numbers.
MarginDash
| Customer | ID | Revenue | Cost | Margin | Margin % |
|---|---|---|---|---|---|
| Plexo Health | 5 | $233.25 | $277.20 | -$43.95 | -18.84% |
| Vantage Ops | 4 | $358.86 | $421.66 | -$62.80 | -17.50% |
| Alder Analytics | 1 | $260.79 | $294.17 | -$33.38 | -12.80% |
| Conduit Logic | 2 | $401.56 | $434.29 | -$32.73 | -8.15% |
| Summit SaaS | 3 | $225.09 | $233.64 | -$8.55 | -3.80% |
| Helix Robotics | 66 | $134.29 | $127.31 | $6.98 | 5.20% |
| Canopy Labs | 25 | $350.89 | $316.85 | $34.04 | 9.70% |
| Ember AI | 78 | $211.12 | $184.94 | $26.18 | 12.40% |
| Stratos Cloud | 53 | $417.32 | $357.64 | $59.68 | 14.30% |
| Lumen Ops | 86 | $153.79 | $129.34 | $24.45 | 15.90% |
| Prism Data | 15 | $105.80 | $87.23 | $18.57 | 17.55% |
Revenue, cost, and margin per customer
Automatic Stripe invoice sync
Negative margins highlighted instantly
Pricing
Simple, predictable pricing
One plan. Full access.
Unlimited plan
$79 /month
Unlimited tracked events, customers, and feature budgets.
SDK budget guard for customer and feature limits
AI API spend tracking at customer and feature level
Margin reporting with Stripe revenue sync
Auto-updated pricing across 400+ models
Optimization
Simulate model swaps before you deploy
Once spend is controlled, test cheaper model options per feature before changing production traffic.
Questions teams ask before rollout
Budget guard is production-focused and intentionally scoped. Here is exactly what it does.
Does this add a proxy hop to every LLM request?
No. Your app still calls providers directly. MarginDash is SDK instrumentation.
What gets blocked?
Calls wrapped with SDK guard methods are blocked when their customer or feature budget is exceeded. Uninstrumented calls are not blocked.
Do you see prompts or completions?
No. MarginDash receives usage metadata (model, token counts, customer ID, feature/event type). Prompt and response bodies stay in your infrastructure.
Can finance still get margin reporting?
Yes. You still get per-customer profitability with Stripe revenue correlation, plus customer/feature budget controls and email alerts.
Control AI spend before it controls you.
Track spend, alert on limits, and block over-budget calls with SDK-side enforcement.
No credit card required ยท or book a demo