Check token usage for GPT-4, ChatGPT, and other OpenAI models.
Token counts vary slightly between models. Defaulting to CL100k base (GPT-4/3.5).
Tokens are the fundamental units of text that LLMs (Large Language Models) like GPT-4 process. They aren't just words.
"Hello", ",", " world", "!". Estimating costs and staying within context limits requires precision. OpenAI's models (GPT-3.5-Turbo, GPT-4) use a specific tokenizer called cl100k_base. Simple word counts are often off by 20-30%.
Rule of Thumb: 1,000 tokens is roughly 750 words of English text.
API costs are billed per 1k input/output tokens. Knowing your exact count helps you predict bills before running large batch jobs.
GPT-4-8k has an 8,192 token limit (input + output). If your prompt is 8,000 tokens, the model can only reply with ~190 tokens.
"step-by-step" reasoning adds tokens. Use this counter to optimize your prompts for density and cost-efficiency.
cl100k_base encoding used by GPT-4, GPT-3.5-Turbo, and `text-embedding-ada-002`. We also fallback for older models like text-davinci-003.