How exact are the counts, and where do the tokenizers come from?

The token IDs are exact: the OpenAI encodings come from OpenAI's own tiktoken data, and for every open model the automated tests check TokenCutter's output against the reference Python tokenizers library on a set of test sentences.

The count is for your text only. A real API request costs a few tokens more, because it adds:

Text that looks like a special token, such as <|endoftext|>, is counted as plain text, the way it would be inside a normal message.

Sources and licences of the tokenizers:

Model Tokenizer source Licence
GPT-5 / GPT-4.1 / GPT-4o / o-seriesopenai/tiktoken (o200k_base)MIT
GPT-4 / GPT-3.5 Turboopenai/tiktoken (cl100k_base)MIT
Qwen 3.8Qwen/Qwen3.8-27BApache-2.0
Qwen 3 / Xiaomi MiMoQwen/Qwen3-8BApache-2.0
DeepSeek V3.2deepseek-ai/DeepSeek-V3.2MIT
Llama 3.1 / 3.2 / 3.3meta-llama/Llama-3.1-8B-InstructLlama 3.1 Community License
GLM-5zai-org/GLM-5MIT
MiniMax M2.5MiniMaxAI/MiniMax-M2.5MiniMax Model License
Mistral (Tekken)mistralai/Ministral-3-14B-Reasoning-2512Apache-2.0
Mistral 7B v0.3mistralai/Mistral-7B-Instruct-v0.3Apache-2.0

The open-model files are copied from pinned versions of these repositories, with their licence and notice files.

Built with Llama. Llama 3.1 is licensed under the Llama 3.1 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.

MiniMax AI model is licensed under the MiniMax Model License, Copyright © MiniMax. All Rights Reserved.

All questions