Install the wrapper
pip install tokevenWrap your client
from anthropic import Anthropic
from tokeven import TokevenAnthropic
client = Anthropic()
tracked = TokevenAnthropic(client, ingest_token="tkv_ing_...")Make a call
Use tracked exactly like your normal client. Cost, tokens, model, and latency are captured automatically.
response = tracked.messages.create(
model="claude-sonnet-4-6",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}]
)Your prompt and completion content never reaches Tokeven — only metadata (token counts, model ID, latency, cost) is sent. (Two opt-in features — prompt revision and advisor.improve() — can send prompt text to Anthropic under your own API key; nothing prompt-related ever goes to Tokeven.)
View your data
Log in to the dashboard to see your first tracked call. Data appears within seconds.