gdhaliwal23
What it does:
- Set budgets at company, customer, and feature level
- SDK checks budget first and blocks requests that exceed limits
- Your app still calls OpenAI/Anthropic/etc directly (no proxy/gateway)
- Prompts and outputs go directly between your app and the AI API provider
- MarginDash only receives usage metadata (token counts)
- TypeScript and Python SDKs
Flow:
Checks limit you set for customer/feature -> sends AI call if within that limit -> records costI’d love feedback on any missing enforcement scope you’d need in production
The hardest part was the cost simulator. Comparing price-per-million-tokens across models is misleading — different models burn different amounts of tokens for the same task. So we normalize token counts to estimate what a swap would actually look like. When we recommend an alternative, we filter out anything that drops more than 10% on any benchmark or can't handle your context window size. Still improving this.
The SDK never sees your prompts or responses — just model name, token counts, and a customer ID. Limitations: simulator recommends from six vendors only, no custom/fine-tuned models, USD only.
Stack is Rails and Postgres. Happy to answer anything.
Show HN: MarginDash – See which AI customers are profitable
I built MarginDash because I couldn't answer a basic question: which of my customers actually make me money after AI costs? My Stripe dashboard showed revenue going up. My OpenAI bills showed costs going up faster. I had no way to connect the two at the customer level. MarginDash is a few line SDK integration (TypeScript, Python, or REST) that tracks model usage per customer and connects it to...
The hardest part was the cost simulator. Comparing price-per-million-tokens across models is misleading — different models burn different amounts of tokens for the same task. So we normalize token counts to estimate what a swap would actually look like. When we recommend an alternative, we filter out anything that drops more than 10% on any benchmark or can't handle your context window size. Still improving this.
The SDK never sees your prompts or responses — just model name, token counts, and a customer ID. Limitations: simulator recommends from six vendors only, no custom/fine-tuned models, USD only.
Stack is Rails and Postgres. Happy to answer anything.
Show HN: MarginDash – See which AI customers are profitable
I built MarginDash because I couldn't answer a basic question: which of my customers actually make me money after AI costs? My Stripe dashboard showed revenue going up. My OpenAI bills showed costs going up faster. I had no way to connect the two at the customer level.MarginDash is a few line SDK integration (TypeScript, Python, or REST) that tracks model usage per customer and connects it to...