What is a token, and how does token pricing work?

The LLM unit of account: token-to-word ratios, and why both context and bills count in tokens.

Tokens are text Lego bricks

Models don’t read characters; they read tokens. One token ≈ 0.75 English words, while a Chinese character is usually 1–2 tokens. Both your prompt and the model’s reply are measured this way.

Why it matters: limits and bills

Context windows are token-denominated, and APIs bill input and output tokens separately. To save: compress prompts, cap output length, downshift model size when possible, and compare prices on OpenRouter.

中文

token 是什么?大模型按 token 计费怎么算

大模型的"计量单位"讲清楚:token 与字数的换算、为什么上下文和账单都按它算。

token = 文字的乐高块

模型不按"字"读文本,而是把文字切成 token:英文一个 token 约 0.75 个单词,中文一个汉字通常 1~2 个 token。你输入的问题、模型输出的回答,都被换算成 token 数量。

为什么重要:额度与账单

上下文窗口(模型一次能"记住"多少)按 token 计;API 账单按"输入 token + 输出 token"分别计价。省钱技巧:压缩提示词、限制输出长度、能用小模型不用大模型,或在 OpenRouter 上比价后再选。

Keep reading / 继续阅读