Skip to main content
Tokonomics is an AI cost metering proxy that gives you complete visibility into how much you spend on language models — across every provider, model, team, and feature — without touching your prompt logic or application code. You redirect your existing LLM requests through a single Tokonomics URL. The proxy forwards them to the real provider, captures the token and cost data silently on the way back, and makes that data immediately available on your dashboard and via webhooks.

How it works

Tokonomics sits transparently in the request path between your application and your LLM provider. The flow is straightforward:
  1. Your app points at Tokonomics. You replace the provider’s base URL in your SDK configuration with a Tokonomics proxy URL — one line of config, no changes to prompts, models, or parameters.
  2. Tokonomics forwards the request. The proxy relays your request to the real provider (OpenAI, Anthropic, etc.) using its own upstream credentials on your behalf, or passes your provider API key through transparently.
  3. Usage is captured silently. When the provider response arrives, Tokonomics extracts the token counts, calculates the USD cost using current published pricing, records latency, and logs any custom tags you attached.
  4. Alerts fire automatically. If the accumulated spend on a key, tag group, or project crosses a threshold you configured, Tokonomics fires a webhook alert in real time — before the next call is made.
Your application receives the unmodified provider response with no added latency overhead beyond a single proxy hop.

What Tokonomics tracks

For every request that flows through the proxy, Tokonomics records:
  • Token counts — input tokens, output tokens, and cached tokens where the provider reports them
  • Cost in USD — calculated from current per-token pricing for the exact model used
  • Latency — total round-trip time from proxy ingress to provider response, returned in the X-Metering-Latency response header
  • Model — the exact model identifier as reported by the provider (e.g., gpt-4o, claude-opus-4-5)
  • Provider — the upstream provider the request was routed to
  • Custom tags — any arbitrary key-value pairs you attach via the X-Metering-Tags request header
  • Tenant ID — the API key used to authenticate the request, enabling per-key spend isolation

Supported providers

Tokonomics supports nine LLM providers out of the box, with no additional configuration required:
  • OpenAI — GPT-4o, o3, and all current and future chat and completion models
  • Anthropic — Claude 3 and Claude 4 families
  • DeepSeek — DeepSeek-V3, DeepSeek-R1, and chat models
  • Gemini — Google Gemini 1.5 and 2.x series via the Gemini API
  • Mistral — Mistral Large, Mistral Small, Codestral, and hosted open models
  • xAI — Grok models via the xAI API
  • Cohere — Command R and Command R+
  • Groq — Fast inference for Llama, Mixtral, and Gemma models
  • Together AI — Open-source model hosting including Llama and Qwen families
New providers are added as they reach production availability. Check the API Reference for the current list of supported provider slugs.

Privacy

Tokonomics never stores your prompt content — only token counts, cost, latency, model, provider, and custom tags are logged.
Tokonomics is designed around a strict zero-prompt-storage policy. The content of your messages — user inputs, system prompts, assistant responses — is never written to disk or retained in any datastore. The proxy reads only what it needs to calculate cost (the usage object in the provider response) and discards the rest. This makes Tokonomics safe to use in regulated environments and removes the compliance burden of auditing a third-party system for prompt data.

Plans

Tokonomics offers two plans:
  • Free — $0/month, includes 100 tracked calls per month. Ideal for evaluation, side projects, and low-volume personal use.
  • Pro — $49/month, includes unlimited tracked calls, unlimited API keys, webhook budget alerts, and priority support.
You can upgrade, downgrade, or cancel at any time from your billing settings. See Plans & Pricing for a full feature comparison.

Quickstart

Set up Tokonomics in 5 minutes and make your first metered API call.

API Reference

Browse every endpoint, header, and response schema in the full API reference.