Model chooser  /  Read PDFs, contracts and scanned documents  /  Recurring

To turn thousands of documents into data, use Mistral OCR 4.

Invoices, forms and filings at volume need a parser, not a chatbot: structured output, bounding boxes, confidence scores and a price per page. Mistral OCR 4 is built for exactly that, with a batch mode and a self-host option.

Why Mistral OCR 4

The reasons it wins for this job.

  • It returns markdown or HTML tables, per-block bounding boxes and confidence scores down to the word, so low-confidence fields can go to a person instead of your database.
  • Mistral reports 85.20 on olmOCR-Bench and 93.07 on OmniDocBench, and 170 supported languages. These are vendor-reported, so test on your own documents.
  • It is priced per page with a cheaper batch mode, which makes cost per document predictable in a way per-token models are not.
  • Enterprise customers can run it in a self-hosted container when documents cannot leave their infrastructure.

How to use it

4 steps to a first result.

  1. 1Collect 50 representative documentsInclude the ugly ones: phone photos, rotated scans, multi-page tables.
  2. 2Run OCR, then extract fieldsUse OCR 4 for text and layout. Map fields with its document annotation feature, or with a small LLM on the markdown output.
  3. 3Route by confidenceAnything below your threshold goes to a review queue. Tune the threshold on your 50 documents.
  4. 4Batch the backlogProcess historical documents through the batch API at the lower rate; use the synchronous API for new ones.

Mistral API, Python

Start from this.

Edit the parts in capitals, then run it.

import os
from mistralai import Mistral

client = Mistral(api_key=os.environ["MISTRAL_API_KEY"])

result = client.ocr.process(
    model="mistral-ocr-latest",  # alias for the newest OCR 4 release
    document={"type": "document_url", "document_url": "https://YOUR-BUCKET/invoice.pdf"},
    table_format="markdown",
    confidence_scores_granularity="word",
)

for page in result.pages:
    print(page.markdown)
Nothing is sent anywhere. It copies to your clipboard.

Alternatives that also work

If Mistral OCR 4 is not an option.

PaddleOCR-VL 1.6Hugging Face →

Baidu · open weights · cost: free weights; you pay for the hardware · 36K HF downloads/mo

Pick it when you must self-host with a clean commercial license. Apache 2.0, 1B parameters, and 96.3 on OmniDocBench v1.6, the top clearly-licensed open model.

Z.ai · open weights · cost: free weights; you pay for the hardware · 1.8M HF downloads/mo

Pick it when you want an MIT-licensed model small enough for any GPU. It reports 94.62 on OmniDocBench v1.5.

Gemini 3.8 FlashOfficial page →

Google · closed · cost: low

Pick it when each document needs reasoning, not just extraction, such as deciding whether an invoice matches a purchase order.

Watch out for

Doing this just once? To understand one long document, give it to Claude Opus 5. A contract, an RFP or a 300-page report needs reading and judgment, not just text extraction. Opus 5 takes PDFs of up to 600 pages in a 1M-token context and reasons about what they mean for you.

Sources

Checked . Models change monthly; we re-check this page when they do.

Picking the model is the easy part.

Wiring it into a workflow that runs every week, with evals, fallbacks and a cost you can predict, is the work. Fifteen minutes, no deck.

Book fifteen minutes →