Token Usage
Understanding AI Tokens in plain language—from beginner to advanced
Token Usage
You don't need to memorize AI theory. From a practical standpoint, a Token is the basic unit of text that the AI processes. Understanding how it's counted and how it works will help you get better results.
What Is a Token?
Officially, the AI processes text in Tokens as the smallest unit—common character combinations:
- Rare characters: e.g. a character like "夔" may be split into several Tokens
- Common words: e.g. "中国" (China) is often 1 Token
Platforms like Deepseek define it more intuitively: a Token is the basic unit the model uses to represent natural language text and is also the billing unit—think of it as a "word" or "character". Typically one Chinese word, one English word, one number, or one symbol counts as 1 Token.
Conversion Ratios (Reference)
Rates vary by model. Common references:
- 1 English character ≈ 0.3 Tokens
- 1 Chinese character ≈ 0.6 Tokens
- For Chinese, 1 Token ≈ 1.5–2 characters is a common estimate
Important: Because different models use different tokenization, actual usage is determined by the model's returned usage field—check the API response for exact counts.
Why Isn’t the Ratio Fixed?
- English: Spaces separate words naturally; e.g. "I love AI" can be 3 Tokens
- Chinese: No spaces; splitting is by "meaning chunks": single characters like "我" "好" can be 1 Token each, two-character words like "喜欢" "女友" 1 Token each, and idioms like "马到成功" can also be 1 Token, so the Token-to-character ratio varies
How Is Token Usage Counted in Practice?
When you chat or send instructions, Token usage has two parts: your input text + the AI’s reply. The sum is the total Tokens for that turn.
Example:
- You ask: "What time does the meeting start tomorrow?" (roughly 5 Tokens)
- AI replies: "The meeting is at 9:00 AM." (roughly 6 Tokens)
- This turn uses: 5 + 6 = 11 Tokens
Accumulation Within One Conversation
Within the same conversation (same context), Tokens accumulate:
- If you have 100 back-and-forth turns in that conversation, the total usage is the sum of all input + output across those 100 turns
- The same content is not billed twice
Offline Token Estimation
You can use the tokenizer code provided in the project package to estimate Token usage for a piece of text offline before sending it.
What Is Context?
Context is not simply "all messages on the page." It is the range of information the AI can "remember" when answering, including:
- Your previous questions
- Documents you sent
- Conversation history
Like talking to a friend: you say "The weather is nice today," they reply "Good for a walk"—that’s a contextual response. If they suddenly said "The pizza yesterday was good" with no prior mention, it would feel out of place. The AI also relies on context to understand you; e.g. if you ask "When was Yu Hua’s last book published?", it needs prior discussion about Yu Hua to answer accurately.
Summary
- Tokens are the basic unit of text the AI processes and the core of billing
- Chinese/English to Token ratios are not fixed; use the model’s
usagefor actual counts - Single-turn usage = input Tokens + output Tokens; multiple turns in the same conversation accumulate
- Context is the range of information the model "remembers" to understand your ongoing requests