Google Gemini Token Counter
Simple Tool to count number of tokens in google gemini text based models. This is based on count_tokens api from Google
Why Count Tokens?
An understanding of tokens is central to using the Gemini API.
As of now the documentation states : For Gemini models, a token is equivalent to about 4 characters. 100 tokens are about 60-80 English words.
More and more LLM models are being used in production. The number of tokens is crucial for cost estimation and for understanding the capabilities of the model. Also, the pricing is not linear. More tokens mean more cost.
Using this simple tool you can get a quick estimate of the cost of your prompts and tweak your prompts accordingly.