TokenPolice
Docs
Get started

Start here

Let your coding agent wire TokenPolice for you, or do it by hand in Python or Node — both paths start with an API key.

Adding TokenPolice means installing an SDK, initializing it at startup, and wrapping the code that handles one run. There are two ways to get there.

The fast way: let your coding agent do it

If you code with Claude Code, Cursor, Copilot, Antigravity, or Codex, install the TokenPolice skill once and ask your agent to integrate. It reads your repo, asks you a short batch of questions, shows you a plan, makes the edits, and then proves the integration actually works before it calls it done. You write no integration code.

Or wire it by hand

It's a small integration — install, init(), wrap your entrypoint — and doing it yourself means you see every line. Pick your language:

Those two pages get you metering. When you're ready to do the whole job properly — identity threading, tool spans, flushing, error handling, and actually verifying it works — follow the same checklist the skill does:

Either way, start with a key

Both paths need the same two things: an API key and the collector URL. Get them once and you're ready for either.