Token price calculator for 400+ LLMs
Token price calculator for 400+ LLMs
Hey HN! Tokencost is a utility library for estimating LLM costs. There are hundreds of different models now, and they all have their own pricing schemes. It’s difficult to keep up with the pricing changes, and it’s even more difficult to estimate how much your prompts and completions will cost until you see the bill. Tokencost works by counting the number of tokens in prompt and completion messages and multiplying that number by the corresponding model cost. Under the hood, it’s really just a simple cost dictionary and some utility functions for getting the prices right. It also accounts for different tokenizers and float precision errors. Surprisingly, most model providers don't actually report how much you spend until your bills arrive. We built Tokencost internally at AgentOps to help users track agent spend, and we decided to open source it to help developers avoid nasty bills.
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Correct prediction on native model
Similar products
Easy token counting and price calculation for LLMs
OnPanda – Steer LLMs and agents at the token level
Checks an SPL token's USD price every 5 minutes via the publ
The SC4-HSM is now a FIDO U2F token
Jwt.show – show the payload of a jwt token
CryptoTokens.wtf – Token Whitepapers from Highest Grossing ICOs
Token Thermodynamics
Price to Hours Worked Calculator
Tether Indicative Price (TIP)
Dogecoin Average - the price of Doge