A Mistral API bill is not "one charge per call." It is calculated from input tokens, output tokens, cache hits, and separate units for specialized models such as OCR and speech. Many teams budget from a single number on the pricing page and then find the bill higher after launch. The cause is usually not a price change but a different input structure, context length, and retry count than assumed.

This article breaks Mistral API billing into computable parts: which units are billed, how input and output add up, why context makes cost grow with turns, how caching and retries affect the bill, and how to budget from real logs and reconcile against invoices. For actual unit prices, refer to Mistral's official pricing page and our model pricing page; this article does not hard-code any unit price.

Note: Mistral and Mistral AI are trademarks of their respective owners. This article uses public documentation from October 2026 as an example; model names, billing units, and prices may change. Verify against the official Mistral documentation and our model pricing page before purchasing.

1. Start with billing units: not every model bills by token

Mistral's language models bill by token, but specialized models such as OCR, speech, and embeddings use their own units. Adding costs from different units together is the first source of budget distortion.

Billed item Unit Typical use Budget note
Language models Input and output tokens Chat, extraction, code, agents Output usually costs more than input; cached input is discounted
OCR Pages, including cached pages Scans, PDF to text Track separately from token bills
Speech transcription Minutes, including cached duration Meeting and support recordings Billed by duration, not word count
Speech synthesis Characters Announcements, voice-over Label input and output separately
Embeddings Input tokens Retrieval, clustering, deduplication Usually input side only
Content moderation Tokens Content safety, risk control Check the current pricing page for whether it is billed

The pricing page usually also distinguishes tiers such as Standard, Batch, and Priority. They target different latency requirements; whether you can use Batch depends on whether the task can wait.

2. Input and output: both sides of the same conversation are billed

In a request, everything that enters the model context counts as input: system prompt, history, user question, tool definitions, retrieved documents, and the converted portion of multimodal input. Generated content counts as output, including text, structured fields, and reasoning traces if the model returns them.

This leads to two common misjudgments:

  • Counting only the user question, not the context. The user may type twenty words, while the system prompt, tool schemas, and five previous turns are the bulk of the bill.
  • Comparing input prices without looking at the output ratio. Support scenarios have heavy input and short output; long-form generation has short input and long output. Their per-call costs cannot be estimated with the same average.

How multimodal input is converted and whether reasoning content counts as output depend on the official documentation and billing rules. Do not apply another vendor's assumptions directly.

3. Context length: every turn pays for what came before

A language model does not store conversation memory by itself. Multi-turn conversations work because the client resends the history on every turn. The longer the context, the more input tokens each request carries, so cost accumulates with turns rather than growing only with the newly added sentence.

A simple example: the first turn sends only the system prompt and the question; the fifth turn carries the previous four exchanges; the twentieth turn carries everything before it. Even if each turn adds little, the input at turn twenty may be several times that of turn one.

The controls are not complicated:

  • Keep only the most recent turns verbatim and summarize older content.
  • Retrieve only relevant passages; do not stuff an entire manual into context.
  • Put stable content first and variable content last to make caching possible.
  • Process long documents in sections and then summarize, instead of repeating the full text every turn.

4. Caching, batch, and retries: three underrated variables

Cached input. Mistral offers a cached input price for text models, usually well below standard input. Whether the cache hits depends on whether the request prefix is stable. Putting timestamps, random IDs, or usernames at the start of the system prompt, or reordering tool definitions every time, will invalidate the cache. Caching is usually best-effort; budget for partial hits rather than assuming every request hits.

Batch tier. Tasks that do not need a real-time response — labeling, summarization, offline classification, bulk translation — can be evaluated on the Batch tier. It trades waiting time for a different price tier; check the pricing page for the current discount and limits.

Retries. Resending after a 429, timeout, or dropped connection increases actual request volume. Whether failed requests are billed and whether retries are charged twice depends on the bill and official documentation. In engineering, use exponential backoff, cap the number of retries, and make create operations idempotent so you do not "pay twice and succeed once."

5. Make a real estimate with usage and logs

Do not guess tokens from character counts. Read the usage object in each response and record it for a week; that gives you the real structure of your workload. The code below calls through an OpenAI-compatible endpoint and reads the model name from an environment variable so changing names are not hard-coded.

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["ZSQH_API_KEY"],
    base_url="https://ai.zhongshangqihang.com/v1",
)

resp = client.chat.completions.create(
    model=os.environ["MISTRAL_MODEL"],  # confirm the name on the pricing page
    messages=[
        {"role": "system", "content": "You are a support assistant. Answer in no more than three sentences."},
        {"role": "user", "content": "Can the shipping address be changed after an order ships?"},
    ],
    max_tokens=256,
)

u = resp.usage
print("input", u.prompt_tokens)
print("output", u.completion_tokens)
print("total", u.total_tokens)

Record at least: timestamp, project, model, input tokens, output tokens, cache hit, retry count, and whether the call was streamed. Multiply by the unit price on the pricing page at the end of the month, but review the process metrics daily.

6. From estimate to invoice: leave margin

When budgeting, estimate four blocks separately and then add them: baseline usage, peak usage, retries and failures, and cache misses.

When reconciling, watch three differences in accounting rules:

  • Prepaid balance is usually deducted at tax-inclusive amounts, while spending caps are often calculated pre-tax; the two may not move in step.
  • An organization-level monthly spending cap constrains every workspace, and a single workspace cap cannot exceed the organization cap.
  • When the balance is insufficient, requests beyond the plan's included usage may return HTTP 402. This is a billing state, not a model failure.

Mistral's billing backend provides an invoice list and PDF downloads. Prepaid top-ups, plan fees, and usage fees appear separately on the bill. For expense reimbursement, archive the invoice, order number, payment receipt, and usage detail together. For the invoicing process itself, see the Mistral API top-up guide on this site.

7. Do not reverse the cost-reduction order

  1. Quantify first: use usage and logs to map the input and output structure of each feature; do not rely on intuition.
  2. Improve cache hit rate next: stabilize the system prompt, tool definitions, and knowledge prefix, and move dynamic content to the end.
  3. Then reduce input: summarize history, retrieve only relevant passages, and keep only necessary fields from tool output.
  4. Limit output: set a sensible max_tokens, require fixed fields or JSON, and reduce repeated explanations.
  5. Route by model: send classification, extraction, and rewriting to lightweight models, and escalate only complex reasoning.
  6. Evaluate batch processing: queue non-real-time work to obtain a different price tier.
  7. Monitor and alert: view usage by project, model, and scenario; set budget caps and balance alerts.

Reverse the order and the usual result is: you switch to a cheaper model, but input is unmanaged and the cache does not hit, so the bill barely moves while quality drops first.

FAQ

Does Mistral API bill per call or per token?

Language models bill by input and output tokens, not per call. Specialized models such as OCR, speech transcription, and speech synthesis use separate units such as pages, minutes, or characters; check the official pricing page.

Why does the bill grow faster as context gets longer?

Because every turn resends the history, input tokens accumulate with the number of turns. Even if each new question is short, cost keeps rising as long as history is not trimmed.

Why is cached input not taking effect?

A common cause is an unstable prefix: timestamps, random IDs, or user information at the beginning, or tool and document order rearranged each time. Move variable content to the end of the request and observe for a while.

Are retried requests billed?

It depends on whether the failure happens before or after billing, and on the current official billing rules. In engineering, cap retries, use backoff, and make write operations idempotent to avoid duplicate consumption.

What should I do if the estimate and invoice do not match?

Check whether history, tool definitions, retries, cache misses, and batch tier differences were omitted, then match request IDs against usage logs. If it still does not add up, investigate with both the invoice detail and the usage records.

Next step

Create a test key at ZSQH AI Gateway, run real tasks for a week, record input, output, and cache hits, then convert the numbers to a budget using the model pricing page. Model availability and prices are governed by the pricing page.

Related reading: