Loading...
Loading...
CostLens gives you per-feature, per-developer cost attribution for OpenAI and Anthropic. Know exactly which prompts are burning your budget.
Wrap your OpenAI or Anthropic client. Every request gets tagged with cost, model, latency, and feature attribution. No other code changes needed.
import { CostLens } from 'costlens' import OpenAI from 'openai' const costlens = new CostLens() const openai = costlens.wrapOpenAI(new OpenAI()) // Your code doesn't change. At all. const res = await openai.chat.completions.create({ model: 'gpt-4', messages: [{ role: 'user', content: 'Say hello' }] }) // → Routed to gpt-3.5-turbo (20x cheaper) // → Quality preserved for this prompt
Real dashboard. Real data. No setup wizards, no config files.


Upgrade for full analytics
Team plan unlocks cost by model, provider, team, and developer breakdowns.
Per-model cost breakdown
See exactly how much you spend on GPT-4o vs Claude Sonnet vs cheaper alternatives.
Savings tracked automatically
Every routed request shows what you would have paid vs what you actually paid.
Not averages. Not estimates. Exact cost, per prompt, per developer.
Attribution
Tag prompts by feature, team, or user. Know that "code review" costs $340/mo and "customer support" costs $89/mo. Make informed decisions about where to optimize.
Safety
Burst detection catches infinite loops. One-click pause from Slack. Auto-resumes after 30 min.
Optimization
Automatically route simple prompts to cheaper models. Save 20-40% without changing your code.
Alerts
Per-key daily budgets, burst rate limits, and spend velocity caps. Get alerted at 80% — or let the system auto-block before you overspend.
Our team was using GPT-4 for everything — summarization, code review, customer support. Same model, wildly different value. CostLens started as an internal tool to figure out what was worth the spend and what wasn't.
2 min
to first cost report
20-40%
typical savings with routing
Free for small teams. Pay when you need team features.
Free
$0
For individual developers.
Cost tracking
Smart routing
MCP Server (Claude Code, Kiro, Cursor)
OpenAI + Anthropic
Burst protection (defaults)
Team
Popular$99/mo
For engineering teams.
Everything in Free
Full analytics dashboard
Response caching
Slack alerts + kill switch
Custom rate limits per key
90-day data retention
Business
$299/mo
For scaling organizations.
Everything in Team
Unlimited data retention
Custom routing rules
Multi-team support
Dedicated support
One npm install. First cost report in under 2 minutes. No credit card required.
npm install costlens