One line change to your OpenAI base URL. We semantically cache, route to the cheapest capable model, and price every request against a versioned book. Your provider keys, your data, your savings.
# Anonymous demo — no API key, no signup, 8 calls/hour per IP
curl https://tokenlens.co.in/api/public/v1/demo \
-H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"explain semantic caching in one line"}]}'
# Production — same OpenAI-compatible contract, your provider keys
curl https://tokenlens.co.in/api/public/v1/chat/completions \
-H "Authorization: Bearer $TOKENLENS_KEY" \
-d '{"model":"auto","messages":[{"role":"user","content":"hi"}]}'Hit the public demo endpoint with your own prompt. We use the actual provider token count to size your monthly savings — no estimation.
| Baseline model | Monthly spend | With TokenLens | You save | % |
|---|---|---|---|---|
GPT-4o OpenAI | $13,125 | $3,617 | $9,508 | 72% |
Claude Sonnet 4 Anthropic | $18,000 | $4,885 | $13,115 | 73% |
Gemini 2.5 Pro Google | $10,313 | $2,886 | $7,427 | 72% |
One config change. Your provider keys stay yours. We never train on your data.
Swap your OpenAI or Anthropic base URL. No SDK rewrite, no prompt changes — your existing code keeps working.
Each call is matched against the semantic cache, scored against routing policy, redacted for PII, and forwarded to the cheapest capable model.
Live stream every request, attribute spend per team/prompt, forecast next-month cost, and run evals — all from one console.
Everything you need to run production LLMs — already shipping, not on a roadmap.
Per-request routing across OpenAI, Anthropic, Gemini and self-hosted models with quality-aware fallbacks.
Vector-aware cache returns sub-50ms answers for semantically similar prompts — zero model call.
Policy engine with PII redaction, prompt firewalls, region restriction and per-key budgets.
Every request as it lands — inspect raw provider usage, latency, route decision, cache verdict.
Tag spend by team, customer, prompt or feature flag. Chargeback-ready exports.
Trend-based projections with confidence bands and budget burn alerts before you blow the month.
Side-by-side prompt & model evals on your real traffic. Promote winners without redeploying.
Inngest-powered batch jobs for offline scoring, backfills and reconciliation.
Real-time provider status, latency and error rates feed routing decisions automatically.
Native Node and Python packages that extend the official OpenAI and Anthropic clients. A REST API for provisioning keys, budgets and policies from Terraform, Helm or your CI.
import OpenAI from "@tokenlens/sdk/openai";
const ai = new OpenAI({
apiKey: process.env.TOKENLENS_KEY,
// baseURL is already tokenlens.co.in/api/public/v1
});
const res = await ai.chat.completions.create({
model: "gpt-4o-mini", // routed → cheapest capable
messages: [{ role: "user", content: "summarize this PR" }],
});
// usage, cache verdict & route decision exposed on res._tokenlens
console.log(res._tokenlens.cache_hit, res._tokenlens.routed_to);We don't estimate your bill — we record the provider's own usage payload, price it against a dated book, and re-verify it on a schedule.
Every OpenAI, Anthropic and Gemini response includes a usage object with prompt_tokens and completion_tokens. We record it byte-for-byte — no estimation.
Costs come from model_price_history, snapshotted at the moment of the request. Old rows keep their historical price even when providers re-price.
A scheduled job re-verifies every request from the last 7 days against the price book and rolls up per-day savings — dashboards never drift.
Open any request in /live → Inspect to see the raw provider usage payload that produced the number.
Localized regex engine strips emails, phones, Aadhaar/PAN, card numbers before the prompt leaves your tenant.
Daily and monthly USD caps enforced at the gateway — keys auto-throttle when they hit the line.
Pin a key to specific provider regions for data-residency compliance.
DELETE never destroys — keys are soft-revoked with timestamp for forensic replay.
Admin role enforced via a separate user_roles table and a SECURITY DEFINER has_role() function.
Costs snapshotted at request time so historical analytics never drift.
Start free. Upgrade when your usage grows.
$5 free credits + $50/mo gateway spend. No card.