Costly

Your AI is Costly.
Let's fix that.

One install. 7 detectors. Every wasted dollar, found.

$npx costly init
Get Started
terminal
$ npx costly init
? Paste your Costly project key: ck_a1b2c3...
Project key verified
Scanning for Anthropic SDK usage...
Updated src/lib/ai.ts
Updated src/services/chat.ts
Installed costly via pnpm
Added COSTLY_API_KEY to .env
You're all set. Dashboard lights up in 48h.

Logs tell you what happened.
Costly shows you the fix.

1 of 7 detectors

your logs
// api response
{
input_tokens: 3,847
system: "You are a helpful..."
cost: $0.0115
}
costly audit

I noticed your system prompt is 2,100 tokens and it's identical across all 14,000 calls this month. That's $89/mo on repeated text. Try enabling prompt caching — it'll cut that to near zero.

Your costs, audits, and savings.
Everything in one place.

Today's Spend
$28.41
1,247 calls
Avg Cost/Call
$0.0228
per API call
Error Rate
2.1%
26 failed calls
Daily Cost Trend
Last 14 days
3/253/294/264/304/31
Total: $409.23Avg: $29.23/day
Bill Forecast
Based on current usage patterns
Current daily avg$28.41/day
30 days$852.30
60 days$1,891.40
90 days$3,124.70
Monthly growth rate+23%
Cost By Feature
chatbot$14.82
648 calls (52.2%)$0.0229/call
summarizer$8.41
312 calls (29.6%)$0.0270/call
classifier$3.67
241 calls (12.9%)$0.0152/call
embeddings$1.51
46 calls (5.3%)$0.0328/call
Cost By Model
Sonnet 4
$18.92
847 calls (66.6%)$0.0223/call
Haiku 4.5
$5.82
312 calls (20.5%)$0.0187/call
Opus 4
$3.67
88 calls (12.9%)$0.0417/call

Our mission goes beyond API calls.
Every wasted token burns real energy.

500ml

Of real water consumed every 20–50 AI prompts. Your code has a water bill.

$200B+

Wasted on cloud compute every year. Idle GPUs, redundant calls, oversized models.

415 TWh

Consumed by data centers in 2024. More than the entire UK uses at home.

Together, we're making a difference.
One optimization at a time.

0water bottles saved

Questions?
We've got answers.

Do I need to give Costly my Anthropic API key?

No. Costly never asks for, stores, or accesses your Anthropic key. You use a Costly project key (ck_...) to send call metadata — model, tokens, and cost. Your prompts and responses never leave your server.

What data does the SDK send?

Only metadata: model name, token counts, estimated cost, latency, and any tags you add. No prompts, no completions, no user data. The SDK is fully open source — read every line.

Will this slow down my API calls?

No. The SDK logs asynchronously with fire-and-forget batching. Zero added latency to your Anthropic calls.

Is Costly free?

Yes. Costly is completely free during the beta — no credit card required. You get one project with 30 days of data retention and full access to all 7 waste detectors.

Is Costly open source?

The SDK that wraps your API calls is fully open source — inspect every line on GitHub. The dashboard and waste engine are hosted for you so there's nothing to deploy.

How are costs calculated?

The SDK reads the model and token counts from each Anthropic response and multiplies by the official per-token pricing. Same math as your Anthropic invoice — no estimates or guesswork.

What AI providers do you support?

Phase 1 supports the Anthropic Claude SDK for Node.js and TypeScript. More providers are coming soon.

You're wasting money on AI.
Start saving with Costly.

Open Source · Made With Love 💚