# reads: openai · anthropic · langsmith · langfuse · vercel-ai-sdk · batch · raw logs
Not a developer? Start here.
- Click See a live example above — that's what a report looks like, in ~2 seconds.
- To get your own numbers, forward this page to whoever manages your AI integration. It takes them about two minutes. You can copy the note below:
Hi — can you run our LLM requests through tokendam.dev? Paste a few real request payloads (or a captured trace) and send me back the report / the "report for your boss (PDF)". Trying to see where we can cut our AI bill.
~/agent $ tokendam --help # how do I get my trace?
Capture a few calls from one agent run — caching, history & duplicate-doc waste only show across multiple calls.
// easiest: the capture helper (any SDK)
import { tap, writeTrace } from "tokendam/capture";
await openai.chat.completions.create(tap({ model, messages, tools }));
await writeTrace("trace.json"); // then paste trace.json here
# — or log the request args yourself —
raw openai sdk
const params = { model, messages, tools };
console.log(JSON.stringify(params));
// paste it — or wrap several as [p1, p2, ...]
raw anthropic sdk
const req = { model, system, messages, tools };
console.log(JSON.stringify(req));
// reads your cache_control markers directly
vercel ai sdk
const openai = createOpenAI({
fetch: async (url, init) => {
console.log(init?.body);
return fetch(url, init);
},
});
langchain / langsmith
from langsmith import Client print(Client().read_run(run_id).inputs) # paste the JSON, or a run / array of runs
How this fits
| tokendam | proxies & gateways (tokenwise, openrouter, portkey…) | |
|---|---|---|
| setup | paste a trace — zero integration | route your prod traffic through them |
| what you get | a Token P&L + a CI gate that fails the build on regressions | a runtime dashboard of live traffic |
| sees your prompts | never — runs in your browser | yes — sits in the request path |
| best for | auditing & fixing waste at the source | ongoing routing / failover / caching |
Use TokenDam to find and fix the waste in your prompts; reach for a gateway when you want to route traffic. Complementary — TokenDam just doesn't ask you to trust it with your data.
For engineers — why not just ask an LLM "where am I wasting tokens?"
You can — and it'll give you a plausible opinion. TokenDam gives you a measurement: exact tokenizer counts × current prices = a dollar figure you can trust, the same answer every time, for free, without sending your prompts to anyone. That's what lets it live in CI with a pass/fail budget and a tokendam diff regression gate — you can't put "paste it into Claude and hope" in a pipeline. Think ESLint, not "ask an AI to review my code."