ToastyKey sits between your code and every AI provider — tracking every call, calculating every cent, and stopping runaway agents before they drain your budget.
$ npm install -g toastykey
From real-time tracking to anomaly detection — built for developers who run AI agents and don't want surprises on their billing page.
Every API call to every AI provider is intercepted, logged, and priced in real-time. See your spend for today, this week, this month — broken down by provider, project, and model. Never discover overspending after the fact.
Set daily or monthly budgets per provider, project, or globally. At 80% you get a warning. At 100%, ToastyKey auto-pauses the responsible provider or kills all API calls outright. Hard stops, not soft suggestions.
Six trigger types — rate spikes, cost spikes, error storms, token explosions, silent drain, new providers. Each fires a configurable action: log, webhook, dashboard alert, Claude Code notification, auto-pause, or auto-kill.
Store all your API keys in one encrypted vault (AES-256-GCM). Auto-detect keys from .env files across your filesystem. Keys never leave your machine. Never.
Claude Code can query its own costs, set budgets, and get optimization recommendations without leaving the conversation. "How much have I spent today?" "Set my daily budget to ₹5,000." 13 MCP tools, fully integrated.
OpenAI, Anthropic, ElevenLabs, Cartesia, Replicate, Stability AI — all native handlers with model-level pricing. Plus a generic HTTP proxy for any REST API. Point it anywhere.
ToastyKey is a transparent proxy. Your code still calls the same APIs — you just swap one base URL. No SDK changes, no code refactoring.
Add ToastyKey to your Claude Code settings.json and get 13 tools that let your AI agent monitor and control its own spending.
The Settings page generates this config automatically — just copy and paste.
Native handlers with model-level pricing for the biggest providers. Plus a generic proxy for any REST API you want to monitor.
Those are great tools. But they're cloud-based, they charge for features, and none of them speak MCP. ToastyKey is the only local-first, Claude Code-native option.
| Feature | ToastyKey | Helicone | Portkey | LiteLLM |
|---|---|---|---|---|
| Local-first, no cloud | ✓ | ✗ Cloud | ✗ Cloud | ✓ |
| Free forever | ✓ | Freemium | Freemium | ✓ |
| MCP / Claude Code native | ✓ 13 tools | ✗ | ✗ | ✗ |
| Visual dashboard | ✓ | ✓ | ✓ | ✗ CLI |
| Anomaly detection | ✓ 6 types | ✗ | ✗ | ✗ |
| Encrypted key vault | ✓ AES-256-GCM | ✗ | ✗ | ✗ |
| Budget auto-pause | ✓ | ✗ | Partial | Partial |
| Zero telemetry | ✓ | ✗ | ✗ | ✓ |
Free, open source, runs on your machine. Up in 3 minutes.
$ npm install -g toastykey