Glossary · LLM Basics

Token

TokenAI Terminology

In one sentence

The basic unit LLMs use to process text. Both model context length and API call costs are calculated in tokens.

A token can be a single character, part of a word, or punctuation, depending on the model's tokenizer. As a rough estimate, one Chinese character typically corresponds to 1 to 2 tokens, though exact counts depend on each model's pricing documentation.

API costs are usually priced separately for input tokens and output tokens, with outputs generally costing more than inputs. When budgeting AI costs, businesses must calculate based on the actual tokens consumed by each task.

Example

Having an AI read a 5,000-word report and generate a 1,000-word summary requires input and output tokens to be billed separately.

Related terms

Context window
The maximum total amount of text an LLM can process at once, including prompts, reference materials, chat history, and its own generated responses.
Large Language Model (LLM)
AI models trained on massive volumes of text that can understand and generate text. Doubao, DeepSeek, ChatGPT, and Claude are all powered by large language models.
API
Interfaces that allow software programs to interact with each other. Enterprise systems and AI agents use APIs to access capabilities such as large language models, search, image generation, and publishing.

← Back to the glossary (79 terms)