Checking status...
IdeaMarketPlanBuilt
# π‘ TokenGuard β LLM Cost Attribution & Budget Limits for AI Startups
> Created: 2026-03-29 | Status: Phase 1 Complete | Next: VALIDATE
---
## The Problem
Developers building AI-powered SaaS products have no simple way to track what their LLM API costs actually break down to per user, per feature, or per agent. OpenAI/Anthropic dashboards show only aggregate usage. When an AI agent starts retrying in a loop, the bill explodes before anyone notices.
**Real evidence from HackerNews (2026-03-29, Ask HN: How are you keeping AI coding agents from burning money?):**
> *"I ended up hacking together a thin layer in front of OpenAI where every request is forced to carry some context (agent, task, user, team), and then just logging and calculating cost per call and putting some basic limits on top so you can actually block something if it starts going off the rails."*
>
> *"It's very barebones, but even just seeing 'this agent + this task = this cost' was a big relief."*
>
> *"I want to know [how] you guys are dealing with this right now. Are you just watching aggregate usage and trusting it, or have you built something to break it down per agent / task?"*
> β HN user bhaviav100 (March 2026)
**Three concrete pains:**
1. **No attribution** β You know you spent $800 this month but not whether it was user A, feature B, or a bug
2. **No limits** β A looping agent or a power user can spike costs 10Γ before you notice
3. **No simple solution** β Helicone is $79/Mo and focused on traces/observability, not budget control
**Pattern:** Founders are building their own proxy layers in front of OpenAI β the classic "I built a spreadsheet" signal, but for cost tracking.
---
## The Solution
TokenGuard sits as a lightweight proxy between your app and the LLM API. You tag each request with metadata (`user_id`, `feature`, `agent_name`). TokenGuard logs the cost, shows you a breakdown dashboard, and lets you set hard budget limits per user or per feature β automatically blocking or throttling requests once a limit is hit.
**Drop-in SDK (1 line change):**
```javascript
// Before:
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
// After:
const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
baseURL: 'https://api.tokenguard.io/proxy',
defaultHeaders: { 'X-TG-Key': process.env.TOKENGUARD_KEY }
});
// Tag requests:
await openai.chat.completions.create({
model: 'gpt-4o',
messages: [...],
// @ts-ignore
'x-tg-user': userId, 'x-tg-feature': 'summarizer'
});
```
**Dashboard shows:**
- Cost this month: total β by user β by feature β by model
- Top 10 most expensive users
- Cost per 1000 API calls per feature (your unit economics)
- Budget limits: set β¬/$X per user/month β block or throttle at limit
- Alerts: email/Slack when any user or feature hits 80% of budget
---
## Target Audience
**Primary:** Solo founders and small teams (1β10 devs) building AI-powered SaaS products
- They have LLM costs in their COGS but no visibility
- Willing to add one SDK import to fix a real problem
- Currently paying $0 (manual tracking) or $79 (Helicone, too complex)
**Secondary:** Indie hackers building AI wrappers, agents, or AI-enhanced tools
**Persona:** Lukas, 29, solo founder of an AI writing tool with 300 paying users. His OpenAI bill grew from $200 to $900 last month and he doesn't know why. He suspects one feature or one user, but the OpenAI dashboard only shows total tokens. He'd pay $19/Mo without hesitation to see "user #47 cost you $340 this month."
**Not for:** Large enterprises (they use Datadog/custom infra), pure DevOps teams
---
## Pricing
| Plan | Price | Limits |
|------|-------|--------|
| Free | β¬0 | 100k requests/month, 3 tags (user/feature/agent), 7-day history |
| Pro | β¬19/month | 2M requests/month, unlimited tags, 90-day history, budget limits, email alerts |
| Scale | β¬49/month | 20M requests/month, Slack webhooks, API access, team seats, 1-year history |
**Usage-based add-on (Pro+):** β¬1 per additional 1M requests
---
## Why This Wins
- **Real, acute pain with direct evidence** β HN founder literally built this manually, asked for alternatives β there are none at this price
- **1-line SDK integration** β friction is near zero; no infra changes needed
- **Price:** Helicone Pro = $79/Mo for an observability platform. TokenGuard = β¬19/Mo focused on cost control
- **Unit economics tool** β "Cost per feature" view is unique; helps founders price their AI products correctly
- **Viral loop:** Every user who queries the proxy data β sees "powered by TokenGuard" in API error messages
---
## Competitive Analysis
| Tool | Price | Cost Attribution? | Budget Limits? | Simple? |
|------|-------|-------------------|----------------|---------|
| Helicone | $79/Mo | Partial (via metadata) | β | β (traces-heavy) |
| Langfuse | Free OSS / $99 cloud | Via tags (complex) | β | β |
| Braintrust | $0βcustom | Partial | β | β |
| OpenAI Dashboard | Free | β (aggregate only) | Hard caps only | β
|
| DIY proxy | $0 (but dev time) | Custom | Custom | β |
| **TokenGuard** | **β¬19/Mo** | **β
(user/feature/agent)** | **β
(hard + soft)** | **β
** |
**Gap:** No tool at under $30/Mo focuses on the combination of (1) simple tagging, (2) per-user cost breakdown, and (3) budget enforcement with automatic blocking.
---
## Scoring
| Criteria | Score | Rationale |
|----------|-------|-----------|
| Pain intensity | 9/10 | Founders manually building this = max signal |
| Market size | 8/10 | Every AI SaaS has this problem; market growing fast |
| Build complexity | 7/10 | Proxy layer + DB + dashboard = 2β3 weeks |
| Competition gap | 8/10 | Helicone too complex/expensive; no budget-focused tool |
| Monetization | 9/10 | Clear ROI: one avoided $300 spike pays for 15 months |
| **Total** | **8.2/10** | |
---
## Unique Value Proposition
> "Know exactly which user, feature, or agent is burning your AI budget β and automatically stop it before it gets out of hand. In 5 minutes, not 5 days."