Your AI bill has names on it.
See them.

Provider dashboards stop at "project spent $5,000". KostLens turns every OpenAI, Anthropic and Gemini call into a financial dashboard: cost per customer, per feature, per model — with a projected invoice, budgets and anomaly alerts.

Free up to 10k events/month, forever · no credit card · 5-minute setup

Why not just the provider console?

Providers meter infrastructure. KostLens measures your business.

OpenAI, Anthropic and Google bill you by organization, key and model — 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.

Provider consoles

OpenAI · Anthropic · Google, out of the box
  • Spend by organization, API key and model
  • One provider per dashboard — three tabs, three currencies of truth
  • "Project X spent $5,000" — and that's where it ends

KostLens

on top of all your providers at once
  • Cost per customer — the number no provider can show
  • Cost per feature, model, day — one dashboard, all providers
  • Projected invoice, budgets, anomaly alerts, deploy markers

Features

Everything between "the invoice arrived" and "now I understand it".

Built for SaaS teams shipping AI features who need to know where the money goes — and who it goes to.

Cost per customer

Tag calls with an endUserId and every customer gets a price tag. Spot the one costing more than they pay.

Cost per feature

Chat, summarize, extract — see which feature burns the budget and which one earns it.

Projected invoice

Know on day 9 what the invoice will say on day 30. Budgets warn at 80%, alert at 100%.

Anomaly alerts

A day running 3× above your 7-day average pings Slack or email before the bill does.

Repricing simulator

Your real token volumes, today's prices, every model: "what would this month cost on Haiku?" — answered.

Deploy markers

One curl in CI drops a marker on the chart. "Did Tuesday's deploy double our spend?" takes two seconds.

CI cost check

kostlens-ci --max-usd 5 fails the pipeline when AI spend crosses your ceiling.

Ask in Claude

The KostLens MCP server answers "which customer costs us the most?" right inside Claude.

How it works

Three lines. TypeScript, Python or Go.

KostLens is an observer, not a proxy: your calls never pass through our servers, your keys never leave your code, and a KostLens outage can never take your app down. Prices are computed server-side from a versioned catalog — intro windows and long-context tiers included.

1

Wrap your client

One wrapper around the SDK you already use. Streaming included. OpenAI-compatible APIs (Groq, OpenRouter, DeepSeek…) work too.

2

Tag what matters

endUserId and feature turn raw usage into business answers.

3

Watch the money

Live dashboard, projections, budgets and alerts. Or import history in 2 minutes with a provider admin key — zero code.

TypeScript
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
Python
from kostlens import KostLens, wrap_openai

kl = KostLens("kl_live_…")
client = wrap_openai(OpenAI(), kl,
    tags={"feature": "chat",
          "end_user_id": user.id})
# use client exactly as before —
# every call is now measured
Go
kl := kostlens.New(kostlens.Options{APIKey: key})

httpc := kostlens.WrapHTTPClient(nil, kl,
    kostlens.MiddlewareOptions{
        Tags: map[string]string{"feature": "chat"},
    })
// pass httpc to the official OpenAI /
// Anthropic Go SDK — done

Pricing

Costs less than the waste it finds.

An event is one tracked AI call. Dashboards, alerts and all three SDKs (TypeScript, Python, Go) are in every plan.

Free

$0
10,000 events/mo · forever
  • Full dashboard, all 6 screens
  • Cost per customer & feature
  • Budgets + anomaly alerts
  • 30-day event retention
Start free
MOST POPULAR

Pro

$49/mo
500,000 events/mo
  • Everything in Free
  • Repricing simulator
  • Deploy markers + CI cost check
  • MCP server access
  • 90-day event retention
Start 14-day trial

Scale

$249/mo
5,000,000 events/mo
  • Everything in Pro
  • 365-day event retention
  • Priority support
  • Higher rate limits
Start 14-day trial

FAQ

The questions engineers actually ask.

Do my API calls pass through your servers?

No. KostLens is an observer, never a proxy: the SDK measures your call locally and sends a tiny usage event asynchronously. Your prompts and keys never touch us, and if KostLens is down your app doesn't notice.

What happens when providers change prices?

Our price catalog is versioned with effective dates — intro windows (like Sonnet 5's) and >200k long-context tiers included — and synced against community sources. New models get repriced retroactively, so history is never wrong.

Do you track streaming?

Yes. Streamed responses are relayed untouched to your app while the final token counts are captured — in both the TypeScript and Python SDKs.

I can't add an SDK right now. Anything for me?

Paste an OpenAI or Anthropic admin key in Settings and KostLens imports your daily usage history in about 2 minutes — zero code. You get day × model costs immediately; add the SDK later for per-customer numbers.

Which providers are supported?

OpenAI (including the Responses API), Anthropic and Google Gemini natively — plus anything OpenAI-compatible (Groq, OpenRouter, DeepSeek, Kimi…) through the OpenAI wrapper. Unknown models are still tracked and priced as soon as a price lands in the catalog.

Is the SDK open source?

Yes, MIT — both SDKs. What you pay for is the platform: storage, dashboards, alerts, projections and the price catalog kept honest.

Stop guessing what AI costs you.

Free for 10k events a month. Wired into your app before your coffee cools.

Start free