How it works
Tokonomics sits transparently in the request path between your application and your LLM provider. The flow is straightforward:- 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.
- 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.
- 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.
- 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.
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-Latencyresponse 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-Tagsrequest 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
Privacy
Tokonomics never stores your prompt content — only token counts, cost, latency, model, provider, and custom tags are logged.
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.
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.