Free VS Code extension · 2 min setup · No code changes

Know what your AI APIs
cost as they happen

Last month I got a £340 Anthropic bill I did not see coming. So I built something that shows the cost of every API call right in your VS Code status bar.

Works with OpenAI, Anthropic, Gemini and Mistral.

TokenLens on Product Hunt

Free tier: unlimited tracking · your data never leaves your machine

TokenLensTokenLensLIVE
? How it worksSet budget+ Add provider
$2.47
TODAY
$18.32
THIS WEEK
$64.19
THIS MONTH
1,284
TOTAL CALLS
anthropic
$28.44
openai
$31.20
google
$4.55
Recent calls
TimeModelInOutLatencyCost
Jul 5 14:32Claude Sonnet 42.4K8201,240ms$0.042
Jul 5 14:28GPT-4o1.1K430890ms$0.018
Jul 5 14:21Claude Sonnet 43.8K1.2K2,100ms$0.071
Jul 5 13:55Gemini 1.5 Flash5.2K890620ms$0.008
TokenLens v0.2.0 · All data stored locallyUpgrade to Pro →

Everything you need to control AI costs

Built by a developer who got burned by a surprise bill.

Live status bar

Your spend shows in real time at the bottom of VS Code. Click it to open the full dashboard.

🎯

Zero code changes

One env var in your .env file. Works with the OpenAI SDK, LangChain, Vercel AI SDK, and any HTTP client.

📊

Full breakdown

Cost by model, by provider, per call. Know exactly which call cost £0.12 and which cost £0.002.

🔒

Fully private

Runs 100% locally on your machine. Your prompts and API keys never leave your computer.

🚨

Budget alerts

Set a monthly limit. Get a notification in VS Code when you hit 75% and 90%.

🔀

All major providers

OpenAI, Anthropic, Google Gemini, Mistral. One extension tracks them all.

Up and running in 2 minutes

1

Install from VS Code

Search "TokenLens" in the Extensions panel or use the marketplace link above.

2

Run Setup

Cmd+Shift+P → "TokenLens: Setup". Picks your providers and writes one env var to your .env file.

3

See your costs

Restart your dev server. Costs appear in the status bar after the first API call.

Simple pricing

Start free. Upgrade when you need more history or team features.

Free

£0forever
  • Unlimited API call tracking
  • OpenAI + Anthropic support
  • 7-day history
  • Status bar cost display
  • Basic dashboard
  • 100% local, no data sent
Install Free
Most popular

Pro

£19/month
  • Everything in Free
  • Unlimited history
  • All providers (Gemini, Mistral)
  • Budget alerts
  • Export to CSV
  • Cloud backup and sync
  • Model comparison view
Start 14-day trial

Team

£49/month
  • Everything in Pro
  • Up to 10 developers
  • Shared team dashboard
  • Per-developer breakdown
  • Shared budget alerts
  • Priority support
Start 14-day trial

Stop guessing what AI costs you

Free forever. No credit card. Your data stays on your machine.

Install TokenLens Free →