AgentOps-AI/tokencost
Easy token price estimates for 400+ LLMs. TokenOps.
Provides client-side token counting using OpenAI's Tiktoken tokenizer and Anthropic's beta token counting API, ensuring accurate counts across different model families. Integrates seamlessly with OpenAI and Anthropic SDKs, supporting both ChatML message formats and raw string prompts for flexible cost estimation. Maintains a curated pricing table tracking 400+ models with automatic USD cost calculations for prompts and completions.
1,952 stars and 811,233 monthly downloads. Used by 2 other packages. No commits in the last 6 months. Available on PyPI.
Stars
1,952
Forks
103
Language
Python
License
MIT
Category
Last pushed
Sep 05, 2025
Monthly downloads
811,233
Commits (30d)
0
Dependencies
3
Reverse dependents
2
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/AgentOps-AI/tokencost"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Related tools
jmuncor/tokentap
Intercept LLM API traffic and visualize token usage in a real-time terminal dashboard. Track...
Merit-Systems/echo
The User Pays AI SDK
Ruthwik000/tokenfirewall
Scalable LLM cost enforcement middleware for Node.js with budget protection and multi-provider support
azat-io/token-limit
🛰 Monitor how many tokens your code and configs consume in AI tools. Set budgets and get alerts...
adarshxs/TokenTally
Estimate Your LLM's Token Toll Across Various Platforms and Configurations