yagil/tokmon
CLI to monitor your program's OpenAI API token usage.
This tool helps you track the cost and token usage of your programs interacting with the OpenAI API. You simply run your existing program through this utility, and it outputs a summary of how many tokens were used, by which models, and the total cost. Anyone developing or running applications that use OpenAI's language models, like GPT-3.5 or GPT-4, would use this to understand their API expenses.
No commits in the last 6 months. Available on PyPI.
Use this if you need to monitor the OpenAI API token usage and associated costs for your applications or scripts, especially for gpt-* models.
Not ideal if you need to monitor models other than gpt-* (like davinci) or if you require an enterprise-grade, production-ready cost management solution.
Stars
57
Forks
5
Language
Python
License
Apache-2.0
Category
Last pushed
Apr 27, 2023
Commits (30d)
0
Dependencies
2
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/yagil/tokmon"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Higher-rated alternatives
jmuncor/tokentap
Intercept LLM API traffic and visualize token usage in a real-time terminal dashboard. Track...
AgentOps-AI/tokencost
Easy token price estimates for 400+ LLMs. TokenOps.
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
adarshxs/TokenTally
Estimate Your LLM's Token Toll Across Various Platforms and Configurations