← all repositories

AgentOps-AI/tokencost

A Python library that provides token counting and price estimation utilities for over 400 LLM APIs.

2k stars Python LLMOps · Eval
tokencost
Velocity · 7d
+2.2
★ / day
Trend
steady
star history

Tokencost offers client-side token counting and cost calculation functions for major LLM providers, enabling developers to estimate the USD cost of prompts and completions before sending API requests. The library tracks pricing changes across hundreds of models from OpenAI, Anthropic, and other providers, integrating with the AgentOps observability platform for broader agent monitoring.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.