Python SDK now available

Track LLM Costs With One Line of Code

Add automatic cost tracking to your OpenAI and Anthropic calls. Get real-time visibility into spending by agent, team, and feature — zero code changes required.

quickstart.py
import tokenr
import openai

# One line to enable tracking
tokenr.init(token="your-token")

# Use OpenAI as normal - costs automatically tracked!
response = openai.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": "Hello!"}]
)
85%
of companies miss AI forecasts
$4,200
avg monthly savings found
10-50x
ROI from cost optimization

Join 200+ engineering teams waiting for early access. No spam, ever.

Get Started in 2 Minutes

pip install tokenr

Zero Code Changes

Auto-patches OpenAI and Anthropic SDKs. Use them exactly as you do now — tracking happens automatically in the background.

Real-Time Attribution

Track costs by agent, feature, team, or customer. See exactly which parts of your system are driving spend — instantly.

Budget Alerts

Set spending limits per agent, team, or feature. Get Slack/email alerts before you blow your budget.

Multi-Tenant Ready

Building a SaaS? Track costs per customer to enable usage-based billing or chargeback to internal teams.

Production-Grade

Async tracking, graceful error handling, zero impact on latency. If Tokenr is down, your app keeps working.

Smart Dashboards

Beautiful charts showing spending trends, cost per agent, model usage, and optimization opportunities.

Built for teams using

OpenAI Anthropic Google AI LangChain LlamaIndex