Free during beta

Token usage trackingwith real USD cost.

Every LLM API call returns token counts. Spillr captures input and output tokens per request, converts them to dollars, and groups by feature — automatically.

Input + output tokens · Streaming supported · No prompt storage

import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://proxy.spillr.io/v1',
  defaultHeaders: {
    'X-Spillr-Key':     process.env.SPILLR_KEY,
    'X-Spillr-Feature': 'rag-query',
  },
});

const res = await client.chat.completions.create({
  model: 'gpt-4.1-nano',
  messages: [{ role: 'user', content: prompt }],
  stream: true,
});

// Spillr logs prompt_tokens + completion_tokens
// and calculates USD cost — even for streams.

The problem

Token counts alone do not tell you what to fix.

Providers report tokens per key — not per feature. Without per-call attribution, you cannot tell whether a prompt change, model swap, or user segment drove a token spike. Spillr connects tokens to feature labels and USD cost in one step.

Raw tokens, no context

Total prompt and completion tokens tell you volume — not which feature or workflow caused it.

Manual cost math

Input and output prices differ per model. Spreadsheets break when you add a new model.

Streaming blind spots

Some tools miss stream usage. Spillr extracts token counts from the final stream chunk.

Features

From token counts to actionable cost data.

🔢

Per-call token logging

Input and output tokens captured on every request — including streamed responses.

💵

Automatic USD conversion

Current model pricing applied instantly. No manual rate tables to maintain.

🏷️

Feature-level grouping

Tag with X-Spillr-Feature. Token usage and cost roll up by label in the dashboard.

📊

Model breakdown

See which models consume the most tokens — and which cost the most per call.

🚨

Budget on USD, not tokens

Set spend limits in dollars. Spillr converts token usage to cost before checking limits.

🔒

Metadata only

Token counts from API responses — never from stored prompt text.

FAQ

Common questions about token usage tracking.

What token data does Spillr capture?

Input tokens (prompt) and output tokens (completion) per API call, plus the model name and calculated USD cost. Streaming responses are tracked from the final usage chunk.

Does Spillr count cached tokens separately?

Spillr records the token counts returned by each provider in the API response. Provider-specific cache pricing is applied when the usage object includes cache token fields.

Can I see token usage by feature?

Yes. Tag calls with X-Spillr-Feature and the dashboard groups both token counts and USD cost by feature label.

How is token cost calculated?

Spillr looks up current per-model input and output token prices and multiplies by the counts from each API response. Pricing updates ship with the Spillr release — no manual rate tables.

Is prompt text stored to count tokens?

No. Token counts come from the provider response metadata. Your prompt and completion text are never stored by Spillr.

Track every token in 2 minutes.

Route through Spillr. Token counts and USD cost appear on the next API call.

Create free account →