Skip to main content
Lesson 10 of 16 · Mistral AI: Introduction and First Steps

Tokens and Context

Lesson 10 of 16 Updated November 2, 2026 Beginner
On this page
  1. Understand the currency of language models
  2. What is a token?
  3. The context window
  4. Cost calculation
  5. Tokens and multilingualism
  6. Hands-on practice
  7. Key takeaways

Updated November 2, 2026. Le Chat is now Vibe. As of May 28, 2026, Le Chat is now Vibe (still at chat.mistral.ai): a single agent for work and code, with your conversations, settings, and subscriptions carried over. The legacy Le Chat experience remains accessible in Chat mode; in Work mode, agents are now skills (invoked with @), memories are the knowledge base, and deep search is the Deep Research skill. Plans are now called Mistral Free, Pro, Team, and Enterprise. This lesson now uses the name Vibe; some menus described here may have changed name or location.

Understand the currency of language models

Tokens are the fundamental unit of any language model. Everything you send to the model and everything it returns is counted, processed, and billed in tokens. Tokens serve as both the unit of measure for the model’s memory and the currency for billing. Understanding this concept is essential to use Mistral models effectively, estimate costs, and optimize your queries. It’s also a modest investment: the idea is simple once you take a closer look.

What is a token?

~4
Characters per token (average)
256k
Max context (Small 4)
~500
Pages in 256k tokens
BPE
Tokenization algorithm

A token is the smallest unit of text processed by a language model. It isn’t exactly a word, and it isn’t exactly a syllable: it’s a text fragment defined by the model’s tokenization algorithm. In practice, a common word like “hello” generally corresponds to a single token, while a rare or technical word splits into several fragments—“disintermediation” could become 3 or 4 tokens. Spaces, punctuation, and special characters also count, and a digit or symbol can constitute a token on its own. In short, you can’t guess the token length of a text at a glance: it depends on the frequency of the words it contains.

The BPE algorithm

Where does this splitting come from? Most modern models, including Mistral’s, use the BPE (Byte-Pair Encoding) algorithm. The principle is simple: analyze a vast text corpus and identify the most frequent character combinations to build an optimal vocabulary. The result is a form of intelligent language compression—frequent words and expressions are represented by few tokens, while rare terms require more.

Practical estimation

To quickly estimate the number of tokens in a text, keep these benchmarks in mind: in English, 1 token corresponds to about 4 characters, or 0.75 words; in French, the ratio is slightly less favorable due to accents and longer words—count about 1 token per 3.5 characters; in code, it varies widely depending on the language, with symbols and indentation consuming their share. Concretely, an A4 page of text (about 500 words) represents approximately 650 to 750 tokens in French.

The context window

The context window is the maximum number of tokens a model can process in a single request—including your message (input) and the model’s response (output). Imagine it as the model’s working memory: everything it “knows” during a conversation must fit there. This includes your current question, plus the exchange history, attached documents, system instructions, and the response being generated.

This limit explains a phenomenon you’ll encounter sooner or later: in a very long conversation, the model seems to “forget” what was said at the start. It’s not a whim—the oldest messages simply fall out of the window, and the model can literally no longer see them. That’s why endless conversations lose coherence, and why it’s often better to start a new thread for a new subject.

At Mistral, sizes vary by model: Mistral Small 4 and Codestral offer 256,000 tokens—the largest window in the lineup—while Mistral Large 3 and Ministral 3 offer 131,000 tokens. With 256k tokens, Mistral Small 4 can handle the equivalent of 500 pages of text in a single request: enough to analyze a complete contract, an annual report, or a sizable codebase.

Cost calculation

If you use the Mistral API on the Scale plan, your bill depends directly on the number of tokens consumed. Prices are expressed in dollars per million tokens, with a distinction between input tokens (your question, attached documents, context) and output tokens (the generated response). Output tokens are generally more expensive because generating text is more computationally costly than reading it.

A few strategies help you master this consumption. Be concise in your prompts: every redundant instruction is counted, and therefore billed. Limit output length when you can—if a 3-sentence summary is enough, specify it explicitly, especially since output tokens are the most expensive. Choose the right model for each task: Ministral for simple tasks, Large for complex tasks. Finally, reuse conversation context: in an ongoing exchange, there’s no need to repeat information already provided; the model still has it in its window.

Tokens and multilingualism

One point deserves the attention of French-speaking users: French consumes on average more tokens than English to express the same idea. Accents can fragment words differently, French words are often longer than their English equivalents, and articles and prepositions appear more frequently. In practice, a text in French will use about 10% to 20% more tokens than the same text in English—a factor to consider in your cost estimates if you work at scale.

Hands-on practice

To make these concepts tangible, run three experiments on Vibe. First ask a short question, then a long question, and observe the difference in response time. Then try to summarize a long document in a single request—Small 4’s 256k token window allows it. Finally, compare the responses to the same prompt formulated in French and then in English to see the length differences for yourself.

Pricing as of August 5, 2026. Prices change regularly. Before budgeting, check the current rates on official Mistral pricing.

Key takeaways

  • A token is the basic unit of text processing, corresponding to about 4 characters
  • The context window determines the amount of text a model can process at once
  • Mistral Small 4 offers the largest window: 256,000 tokens (about 500 pages)
  • The API cost is directly proportional to the number of tokens consumed
  • French consumes more tokens than English for the same content
  • Optimize your costs by choosing the right model and being precise in your prompts