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

Quickstart

Up and running in under five minutes.

  1. Install

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

    import Anthropic from "@anthropic-ai/sdk";
    import { wrapAnthropic } from "@tokli/node";
    
    const anthropic = wrapAnthropic(new Anthropic()).withFeature("checkout");
    
    // Use it exactly like before — usage reports itself, fire-and-forget.
    const reply = await anthropic.messages.create({
      model: "claude-sonnet-5",
      max_tokens: 300,
      messages: [{ role: "user", content: "Hello" }],
    });

    Set TOKLI_INGEST_KEY in your environment — that's the whole setup. Without it the wrapper is a silent no-op: your app never breaks.

  3. Watch your spend

    Every call shows up in your dashboard — by day, model and feature, priced to the micro-cent. Create your project and paste the ingest key. Here's what you get:

The tokli dashboard: total spend, tokens and API calls, a spend-by-day chart and a cost breakdown by model
Every call, priced to the micro-cent.

Why tokli

Built to watch costs, not your data.

Report-only by design

We never see, store or proxy your provider API keys. The SDK reads token usage from responses you already receive.

Cost per feature

Tag calls with .withFeature() and learn which part of your product actually burns the budget.

A native SDK, not a billing scraper

Wraps your existing client. Fire-and-forget, zero added latency, fails open — it can never take your app down.

Sub-cent accuracy, real alerts

Costs computed server-side from versioned prices, tracked to the micro-cent. Get warned before the spike, not after the invoice.

Works with the LLM APIs you already use — ten providers, streaming included.

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

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.

Your AI bill, explained.

No credit card. Uninstall = delete one line.

Start tracking — it's free