Track AI API spend by customer and feature.
Get limit alerts and stop over-budget calls. No proxy required.
No credit card required
$0
$0
$0
0%
Revenue vs Cost Over Time
Budget Status
Built for real cost control, not just reporting
No proxy hop
App calls providers directly
SDK budget guard
Block over-budget calls by customer/feature
Margin-aware tracking
Costs mapped to revenue and customer IDs
Fast setup
Install SDK, track events, set budgets
Works across OpenAI, Anthropic, Google Gemini, AWS Bedrock, Azure, Groq, and more.
Architecture
Your app still calls providers directly. MarginDash provides the budget state control plane, and the SDK enforces decisions at call time.
Runtime data
Your app sends model/token usage plus customer and feature IDs. Prompts and completions stay in your stack.
Control plane
SDK polls a lightweight blocklist endpoint with TTL/version caching.
Enforcement path
Wrap calls with guardedCall. If a customer or feature budget is exceeded, the SDK blocks the request.
Create org-wide, feature, and per-customer budgets.
Budgets
3 creatednpm install ai-cost-calc
Also available as pip install ai-cost-calc or use the REST API
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
});
Budgets, blocking, revenue correlation, and current model pricing in one workflow.
Budgets
Define limits by customer or feature and monitor utilization continuously.
Revenue
Connect Stripe, or pass revenueAmountInCents via SDK events. Works with any billing system.
Pricing
Provider pricing syncs daily across 400+ models so cost calculations stay current.
Enforcement
Use SDK guard methods to block over-budget calls without rerouting traffic through MarginDash.
Margin reporting
If you connect revenue, MarginDash shows cost, revenue, and margin per customer so engineering and finance share the same numbers.
| 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% |
Pricing
One plan. Full access.
Unlimited plan
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
Once spend is controlled, test cheaper model options per feature before changing production traffic.
Budget guard is production-focused and intentionally scoped. Here is exactly what it does.
No. Your app still calls providers directly. MarginDash is SDK instrumentation.
Calls wrapped with SDK guard methods are blocked when their customer or feature budget is exceeded. Uninstrumented calls are not blocked.
No. MarginDash receives usage metadata (model, token counts, customer ID, feature/event type). Prompt and response bodies stay in your infrastructure.
Yes. You still get per-customer profitability with Stripe revenue correlation, plus customer/feature budget controls and email alerts.
Track spend, alert on limits, and block over-budget calls with SDK-side enforcement.
No credit card required · or book a demo