Token Guard
Buy license
Free, open-source, runs locally

Stop surprise LLM bills.

Track every token. Set hard limits. Keep your prompts on your machine.

Token Guard is a local gateway that sits between your coding agents and OpenAI, Anthropic, or Gemini. It counts cost per project, enforces budgets, and fails over to backup providers โ€” without ever seeing your prompts.

macOS ยท Windows ยท Linux

How it works

One environment variable. No SDK changes. No extra network hop.

1

Point your client

Set OPENAI_BASE_URL=http://localhost:3742/v1. Token Guard speaks the OpenAI, Anthropic, and Gemini SDK shapes natively.

2

Add your real key

Store your provider API key in Token Guard once. It lives in the OS keychain and is never written to your agent's config.

3

Tag projects

Give each project a label key and use it as OPENAI_API_KEY in that agent. Token Guard tags the request and forwards with your real key.

Everything you need to control spend

๐Ÿ’ฐ

Real-time cost tracking

See spend per project, provider, model, and day. Catch runaway agents before they rack up a bill.

๐Ÿšฆ

Budgets & limits

Set money, token, request, or time caps by project or globally. Choose warn, block, or pause when a limit is hit.

๐Ÿ”Œ

One proxy, three API shapes

Use OpenAI, Anthropic, or Google Gemini SDKs against any configured provider. Requests, responses, and streams are converted automatically.

๐Ÿ”„

Provider fallback

Link a backup provider to each primary. If the main provider returns a 5xx or 429, Token Guard retries and falls back automatically.

๐Ÿ”’

Keys in the OS keychain

API keys live in Windows Credential Manager, macOS Keychain, or Linux Secret Service. Your code and config files never touch them.

๐Ÿ–ฅ๏ธ

Native tray app

Pause, resume, open the dashboard, or check today's spend from the system tray on macOS, Windows, and Linux.

One env var. Done.

Your existing OpenAI-compatible client keeps working. Token Guard only intercepts the base URL.

OPENAI_BASE_URL=http://localhost:3742/v1
OPENAI_API_KEY=tg_your-project-label-key
Token Guard Cloud gateways Self-host (LiteLLM)
Can see your prompts Cannot Can Can
Extra network hops 0 2 1
Setup 1 env var SDK + account Docker + Python
Where keys live OS keychain Their cloud Server env
Native tray app Yes No No
Multi-format SDK support OpenAI / Anthropic / Google Varies Usually OpenAI only

Simple, honest pricing

The app is free and fully functional. Buy a license to remove the support banner and enable automatic updates.

$4.99 USD

One-time payment. No subscription.

Taxes may apply and will be calculated at checkout.

  • โœ“ Remove the support banner
  • โœ“ Automatic updates from GitHub Releases
  • โœ“ Lifetime v1.x updates
  • โœ“ Use on up to 2 devices

Ready to stop surprise bills?

Download the free app and route your first request in under a minute.