AI cost tracking for OpenAI, Anthropic, Gemini & 7 more

Stop getting scared by your AI bill.

Change one line of code and see your spend by day, model and feature — with budget alerts before it spikes. Report-only: your API keys never leave your app.

Free while in early access · No credit card · Keys never leave your app

Turn the page

Quickstart

Up and running in under five minutes.

  1. Install

    terminal
    npm install @tokli/node
  2. Wrap your client

    index.ts
    import Anthropic from "@anthropic-ai/sdk";import { wrapAnthropic } from "@tokli/node"; const anthropic = new Anthropic();const wrapped = wrapAnthropic(anthropic, {  ingestKey: process.env.TOKLI_INGEST_KEY,});// usage is reported automatically

Works with 10 providers

  • OpenAI
  • Anthropic
  • Gemini
  • DeepSeek
  • xAI
  • Mistral
  • Qwen
  • GLM
  • Kimi
  • OpenRouter

What you get

Every call, priced to the micro-cent.

Set TOKLI_INGEST_KEY and every call shows up here — by day, model and feature. Without the key the wrapper is a silent no-op.

By day
Daily spend chart, with the current day marked as partial
By feature
Cost drivers: spend per feature tag, each with its share of the total
By model
Spend by model, with calls, tokens and cost for each one

Control

Know before the invoice.

Monthly budget ruler showing spend against the expected pace for today
A pace needle, not a progress bar. See if today's spend is ahead of where the month should be — and what it projects to.
Daily spend chart with outlier days flagged as spikes
Spike days, flagged. Days that break your pattern get marked on the chart — and budget alerts email you before the line is crossed.

Last event · 3 min ago

Always know it's flowing. The dashboard shows when the last event landed, and warns if ingestion goes quiet.

The bottom line

Your AI bill, explained.

  • Setup1 line of code
  • Your API keys shared0
  • Added latency0 ms
  • Price while in early access$0.00
Start tracking — it's free

No credit card · Uninstall = delete one line

FAQ

Before you add it to production.

Does tokli see my provider API keys?

No. tokli is report-only: your code calls the provider with your own key, and the SDK reads token usage from responses you already receive. Your keys never leave your app.

Does the SDK add latency to my LLM calls?

No. Usage is reported fire-and-forget after your call completes — tokli never sits in the request path.

What happens if tokli goes down?

Nothing happens to your app. The wrapper fails open: if the ingest key is missing or reporting fails, it's a silent no-op and your calls work exactly as before.

Does it work with streaming responses?

Yes. Every supported provider reports token usage in the final stream event, and the SDK captures it without touching your stream. A few providers need stream_options: { include_usage: true } on streaming calls — each wrapper's docs say whether yours does.

Which providers and models are supported?

OpenAI, Anthropic, Gemini, DeepSeek, xAI, Mistral, Qwen, GLM, Kimi and OpenRouter, with costs computed server-side from a versioned price table. Calls to unknown models are still recorded and flagged — never dropped.

How much does tokli cost?

tokli is free while in early access. No credit card required.