← 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
Not currently ranked — collecting fresh signals.
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.

Frequently asked

What is AgentOps-AI/tokencost?
A Python library that provides token counting and price estimation utilities for over 400 LLM APIs.
Is tokencost open source?
Yes — AgentOps-AI/tokencost is open source, released under the MIT license.
What language is tokencost written in?
AgentOps-AI/tokencost is primarily written in Python.
How popular is tokencost?
AgentOps-AI/tokencost has 2k stars on GitHub.
Where can I find tokencost?
AgentOps-AI/tokencost is on GitHub at https://github.com/AgentOps-AI/tokencost.

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