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.
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!"}]
)
Join 200+ engineering teams waiting for early access. No spam, ever.
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