Paste your text
Estimate: ~4 chars/token for Latin text and code, ~1.5 chars/token for CJK. Exact counts vary by model tokenizer (±10–15%). Cost shown at $2.50 per million input tokens.
What exactly is a token?
Models don't read characters or words — they read tokens, chunks produced by the model's tokenizer. In English, a token averages ~4 characters (“understanding” splits into several tokens; “the” is one). Chinese and Japanese pack more meaning per character, so they average ~1.5 characters per token — which is why the same paragraph costs more tokens in 中文 than its English translation.
Everything is billed in tokens: your prompt (input), the model's reply (output, usually priced 3–5× higher), and with vision models even images get token-priced. Long system prompts silently multiply costs on every single call.
Three habits that cut API bills
- Trim system prompts. A 2,000-token system prompt on a chatbot serving 10k requests/day burns 20M input tokens daily before users type a word.
- Cap output length. Output tokens cost several times more than input — set
max_tokensto what you actually need. - Batch and cache. Identical requests should hit your cache, not the API. Gateways like One API add usage accounting per key so you see who burns what — see our gateway guide.