Input token counts and costs for over 160 AI models

We're offering this service completely free of charge, no credit card or payment required. Yes, really.

You need an account to get your API key.

Token counts screenshot
Tokens API Request
{
   "input": "Felis nunc phasellus arcu ad bibendum elementum taciti. Arcu
magnis cubilia aliquam libero lorem accumsan venenatis risus primis.
Imperdiet porttitor himenaeos nulla diam pharetra hac litora nunc.
Feugiat pulvinar ante adipiscing curae efficitur eros platea? Fermentum
dui pellentesque nec mattis ipsum quisque class nam. Porttitor ultrices
potenti tempus libero porttitor volutpat purus potenti. Blandit orci
habitant diam pulvinar ornare integer gravida. Mattis sem bibendum
parturient aliquet; donec penatibus dictum. Praesent imperdiet egestas
dis mi vulputate, curabitur montes urna. Conubia habitant gravida iaculis
curabitur natoque. Mus donec est pharetra inceptos mattis quam accumsan.
Nisl a tristique torquent leo sed, imperdiet semper dui natoque. Congue
vivamus purus egestas convallis sit ut class condimentum.",
   "type": "text",
   "models": [
      "claude-3.5-sonnet",
      "command-r",
      "gemini-1.5-pro",
      "gpt-4o"
   ]
}
Tokens API Response
[
   {
      "model": "claude-3.5-sonnet",
      "token_count": 265,
      "token_cost": 0.000795
   },
   {
      "model": "command-r",
      "token_count": 232,
      "token_cost": 0.0000348
   },
   {
      "model": "gemini-1.5-pro",
      "token_count": 226,
      "token_cost": 0.0002825
   },
   {
      "model": "gpt-4o",
      "token_count": 195,
      "token_cost": 0.0004875
   }
]

Two ways to use *

Within the app
Use our friendly UI to manually check ad hoc inputs for any of the 160+ AI models. Useful for visually comparing input token counts and cost between AI models.
The Tokens API
Quickly and easily incorporate input token counts and cost into your apps, services, and workflows with our simple and fast Tokens API. All you need is an API key.

* And both are completely free

Supported AI models

We currently support over 160 AI models from 19 model authors.

AI21
Amazon
Anthropic
Cohere
Databricks
DeepSeek
Google
IBM
Meta
Microsoft
Mistral
Nvidia
OpenAI
Qwen
Snowflake
Stability
TIIUAE
xAI
Zyphra

Why this matters

Context Windows
Ensure your prompts stay within the size of the context window of your AI models.
Improved Token Counts
You no longer have to rely on token estimates from other libraries or your own calculations.
Up Front Insights
Get input token counts and costs before calling your AI model instead of waiting on its response.

Your data is your data

Whether you use our token counter in the app or through the Tokens API, we don't log, track, or store your input data.

Frequently asked questions

How does this work?
For the Google Gemini and Amazon Titan models, we call their APIs to get input token counts. For all other AI models, we use their specific AI model tokenizers from Hugging Face.
Is this really free?
Yes! The only "cost" to you is having to create an account so you can get your API key.
Are there any limits or restrictions to how I can use it?
The API is currently limited to 5000 requests per month and 10 requests per second, per account. If you need a higher limit, please contact us at hello@zatomic.ai so we can better understand your needs.
There is no limit to using the token counter in the app.
I don't see my AI model. How can it get added to the list?
Contact us at hello@zatomic.ai with some details and we'll see what we can do.
Does this support image or video tokens?
Only text inputs are supported at this time. However, we already have plans to incorporate input tokens for images and videos.
Where did you get the price per input token costs?
All price per input token costs are derived from publicly available information from the websites of the AI model authors. For example, at the time of this writing, the input token pricing for OpenAI's gpt-4o model is $2.50 per 1 million tokens. That equates to a cost of $0.0000025 per input token.
Why don't some AI models have a price per input token?
This is because we couldn't find published information regarding its cost or the model is available as open-source.
What if I notice a price per input token cost is wrong?
We do our best to keep up with any pricing changes, but if you see that we have outdated costs, please let us know at hello@zatomic.ai and we'll make the necessary changes.
What happens to my input data?
Nothing. It gets fed into our tokenizers and/or APIs to calculate the token counts and that's it. We don't keep it around or persist it anywhere.