Cursor shows you Cursor. Copilot shows you Copilot. Your OpenAI invoice shows you one number. KostLens is the one place where the API your app calls and the seats your team pays for become a single answer. That includes cost per customer and per feature, which no vendor dashboard can give you.
Free up to $1,000 of tracked spend/month · no credit card · 5-minute setup
Why not just the provider console?
OpenAI, Anthropic and Google bill you by organization, key and model, the dimensions of their system. Your questions are about your system: customers, features, margins. They can’t answer those. We can, because you tag the calls.
Features
For every team that ships AI features and pays the invoice: product companies, agencies, platforms, internal tools. If tokens cost you money, this shows where the money goes and who sends it there.
Tag calls with an endUserId and every customer gets a price tag. Spot the one costing more than they pay.
Chat, summarize, extract. See which feature burns the budget and which one earns it back.
Know on day 9 what the invoice will say on day 30. Budgets warn at 80%, alert at 100%.
A day running 3× above your 7-day average pings Slack or email before the invoice does.
Your real token volumes at today’s prices, on any model. “What would this month cost on Haiku?” takes one click.
One curl in CI drops a marker on the chart. “Did Tuesday’s deploy double our spend?” takes two seconds.
kostlens-ci --max-usd 5 fails the pipeline when AI spend crosses your ceiling.
The KostLens MCP server answers “which customer costs us the most?” right inside Claude.
Every customer, ranked by what they cost you this month. The account that eats your margin stops hiding inside an aggregate.
Spend anomalies and budget breaches go to your Slack or inbox with the context attached, including the deploy that landed right before the spike.
How it works
KostLens is an observer, not a proxy. Your calls never pass through our servers, your keys never leave your code, and a KostLens outage costs you telemetry, never uptime. Prices are computed server-side from a versioned catalog that covers intro windows and long-context tiers.
Three lines of SDK
Every provider in our catalog, plus anything OpenAI-compatible: point the OpenAI SDK at their base URL and it just works. One wrapper around the client you already use, streaming included. The only path that knows which customer made the call, because only your code knows.
An admin key, zero code
Paste a read-only key for OpenAI, Anthropic, Cursor or Copilot and we import the account twice a day. Nothing to deploy.
OpenTelemetry, nothing installed
Claude Code and Gemini CLI emit it natively. One settings file in the repository and
the whole team reports on their next git pull.
import { KostLens, wrapOpenAI } from "@kostlens/track"; const kl = new KostLens({ apiKey: "kl_live_…" }); const openai = wrapOpenAI(new OpenAI(), kl, { tags: { feature: "chat", endUserId: user.id }, }); // use openai exactly as before. // every call is now measured.
from kostlens import KostLens, wrap_openai kl = KostLens("kl_live_…") client = wrap_openai(OpenAI(), kl, tags={"feature": "chat", "endUserId": user.id}) # use client exactly as before. # every call is now measured.
kl := kostlens.New(kostlens.Options{APIKey: key})
httpc := kostlens.WrapHTTPClient(nil, kl,
kostlens.MiddlewareOptions{
Tags: map[string]string{"feature": "chat"},
})
// hand httpc to the official OpenAI or
// Anthropic Go SDK. that's the whole setup. Pricing
An event is one tracked AI call. Every plan includes every feature: all six screens, all three SDKs, alerts, the MCP server and the CI check. Paid plans buy volume and history, and open with the public launch.
FAQ
No. KostLens is an observer, never a proxy. The SDK measures your call locally and sends a small usage event in the background. Your prompts and API keys never touch our servers, and if KostLens ever goes down you lose some telemetry, never a request.
Our price catalog is versioned with effective dates, including intro pricing windows and long-context tiers. It updates daily, and a jump big enough to look like a mistake is held back until it proves stable, so a bad number never lands on your dashboard overnight. New models are priced automatically and past events are repriced retroactively, so your history gets corrected instead of going stale.
The catalog prices more than 2,000 models across 50+ providers, so the short answer is almost certainly yours. The SDK ships dedicated wrappers for OpenAI, Anthropic and Google Gemini; everything else goes through the OpenAI wrapper, which covers any OpenAI-compatible API (xAI Grok, Groq, DeepSeek, Kimi, GLM, Mistral, OpenRouter and the rest) by pointing the SDK at their base URL. Azure OpenAI and AWS Bedrock are priced separately from direct, because the same model costs more there. If a model is genuinely missing, it is stored, flagged on your dashboard instead of counted as zero, and repriced retroactively the moment the price lands.
Yes. Streamed responses are relayed to your app untouched while token counts are captured. The TypeScript and Python SDKs request usage data automatically; in Go you enable it with one flag, so your byte stream is never altered without your say-so.
Paste an admin key in Settings and KostLens imports the account on its own, twice a day, zero code. OpenAI and Anthropic give you day-by-model cost; Claude Code gives spend per developer across the whole organization, including people who never set anything up; Cursor gives cost per developer at the amount Cursor actually charged; GitHub Copilot gives AI credit spend in the dollars GitHub bills. Add the SDK later for per-customer numbers.
Yes, and without a plugin on anyone’s machine. Claude Code and Gemini CLI emit OpenTelemetry natively: point it at KostLens with a few environment variables and you get spend per person and per project. Cursor and Copilot are connected with an admin key instead. We read the standard GenAI metric, so tools that adopt it later work with no change.
Because each one only shows itself, and none of them knows your customers. Cursor tells you what Cursor cost, Copilot what Copilot cost, and your provider invoice gives you one number for everything your app called. Three answers you still add up by hand every month, in three retention windows you do not control. KostLens is the layer above them: one total across API calls and seats, and the two dimensions no vendor dashboard can have, because they belong to your business and not to the tool: which of your customers cost you money, and which feature spent it.
No. Export usage from that tool’s admin console and drop the CSV into Settings. KostLens reads the header, works out which column is the date, the person, the model and the cost, and the data lands in the same dashboards as everything else. It works for tools we have never heard of, including ones that do not exist yet. When the file says what you were charged, that number wins over our catalog, and re-importing the same period never double counts.
The AI spend we track for you in a calendar month, added up across every project in your organization. Nothing else: not how many calls you make, not how many people you have, not how many models or providers you use. Every feature is available on every plan, so the only thing you outgrow is the amount of money you are watching. If you use KostLens to cut your AI bill, your KostLens bill goes down with it.
Yes, anytime, from your billing settings. Upgrades, downgrades, card changes and cancellation are handled through Stripe’s secure portal, so we never touch your card details. If you cancel you keep your plan until the end of the period you already paid for, then move to Free. Your charts and monthly totals stay; only the older request-level detail ages out to the Free window.
Application data is hosted in the United States, and prompts never reach us in the first place: we store usage metadata, not message content. Deleting your account clears your data from the live database immediately, and from backups as they rotate: within 7 days on the server and 90 days offsite. Data exports and any other privacy request go to [email protected] and are answered within 15 days. The privacy policy explains exactly what we store, who processes it, and why rotation is what removes data from a backup.
Yes, MIT licensed, all three of them (TypeScript, Python and Go). What you pay for is the platform: storage, dashboards, alerts, projections and a price catalog that someone keeps honest.
Free up to $1,000 of tracked spend a month. Wired into your app before your coffee cools.
Start free