An invoice lands in your inbox as a scanned PDF. You open it, read the line items, type the total into your accounting software. Five minutes later, you do it again for the next one. And the next. For a 20-person company averaging 47 invoices per month, that's 4 hours of pure data entry — not counting the typos that slip through.
I just tested Mistral OCR 4, the latest document understanding model from Mistral AI released on July 7, 2026. Hooked up to n8n, it turns a raw PDF into structured data in under 3 seconds, at $0.004 per page.
This article is for someone who wants to understand what OCR 4 changes on the ground, where to start, and what can go wrong. No marketing fluff — just API calls, hard numbers, and real pitfalls.
What Makes OCR 4 Different
The previous version (OCR 3) already extracted text. OCR 4 adds three capabilities that transform basic character recognition into a proper document capture tool:
- Bounding boxes: the model identifies where each paragraph, table, and signature sits on the page. You know the invoice total is in the bottom-right block, not buried in a text stream with no spatial anchor.
- Block classification: titles, tables, equations, signatures — the model labels each element with its role. On an invoice, you can isolate the "amounts" block from the "vendor details" block without writing a single business rule.
- Confidence scores: per-word or per-page. When Mistral is unsure, it flags it. This is what lets an automated workflow decide "send to accounting" or "send to review" without human intervention.
OCR 4 tops OlmOCRBench at 85.20 and beats Google Document AI and AWS Textract in human preference tests. It supports 170 languages across 10 language groups, with native-grade French, German, Spanish, and Italian. Mistral AI is a French company, and the OCR quality on European business documents reflects that.
Pricing That Actually Scales
The API price is $4 per 1,000 pages. Asynchronous batch processing drops that to $2 per 1,000 pages.
Real-world monthly costs for an SME:
- 50 invoices per month → $0.20/month
- 200 documents (invoices + quotes + receipts) → $0.80/month
- 1,000 pages (busy 50-person company) → $4/month
For context, an hour of manual data entry costs roughly $30-45 in internal cost (salary + overhead + workspace). If you save 4 hours per month, you free up $120-180 of human time. The API cost tops out at $0.20. The ratio is 1 to 600.
The real cost isn't the API. It's the hours you're still spending copying numbers by hand.
For sensitive documents — contracts, payroll, legal agreements — OCR 4 can be self-hosted in a single container on your own infrastructure. No data leaves your network. The self-hosted option requires an enterprise license but removes per-page costs entirely.
Mistral OCR 4 vs. the Competition
If you're evaluating OCR for your company, you'll quickly land on four options. Here's how they compare on the criteria that actually matter:
| Feature | Mistral OCR 4 | Google Document AI | AWS Textract | Tesseract (OSS) |
|---|---|---|---|---|
| Price | $4/1K pages ($2 batch) | $1.50/1K pages | $1.50/1K pages | Free |
| Self-hosted | ✅ Single container | ❌ Cloud only | ❌ Cloud only | ✅ |
| Block classification | ✅ Titles, tables, equations, signatures | ✅ Forms, tables | ✅ Forms, tables, signatures | ❌ |
| Confidence scores | ✅ Word + page | ✅ | ✅ | ✅ (basic) |
| Languages | 170 | ~50 | ~20 | 100+ |
| Structured JSON | ✅ Custom prompt | ✅ | ✅ | ❌ |
| Headquarters | 🇫🇷 Paris, France | 🇺🇸 USA | 🇺🇸 USA | Open source |
The table is informative but one criterion often decides the choice on its own:
Data sovereignty. Running invoices, payroll records, or contracts through a US cloud provider exposes them to the Cloud Act. For European SMEs subject to GDPR, Mistral offers the best balance of recognition quality and data control — with the option to self-host entirely if data sensitivity demands it.
Tesseract is free but its quality on complex documents (multi-column invoices, nested tables) is significantly lower. Google and AWS are competent, but your data travels through their data centers. Mistral is a European company, its OCR is stronger on European business documents, and self-hosting is a real option. The $0.0025/page price gap with Google isn't worth the sovereignty trade-off.
What the API Actually Returns
When you read "the API returns structured data," you might imagine a magic table with all the fields filled in. The reality is more useful — and worth examining closely.
Here's what Mistral OCR 4 returns for an invoice, simplified:
{
"pages": [
{
"index": 0,
"markdown": "INVOICE INV-2026-0456\n\nVendor: DURAND SAS\n42 rue de la Paix, 75002 Paris\nSIRET: 523 456 789 00012\n\nItem | Qty | Unit Price | Total\nConsulting July 2026 | 1 | €5,000.00 | €5,000.00\n\nSubtotal: €5,000.00\nVAT 20%: €1,000.00\nTotal: €6,000.00\n\nDue: 15/08/2026",
"dimensions": {"width": 595, "height": 842},
"confidence": 0.97,
"blocks": [
{"type": "title", "bbox": [50, 40, 400, 65], "text": "INVOICE INV-2026-0456"},
{"type": "table", "bbox": [50, 250, 545, 310], "text": "Item | Qty | Unit Price | Total..."},
{"type": "paragraph", "bbox": [50, 340, 350, 400], "text": "Subtotal: €5,000.00"}
]
}
]
}
The bounding boxes (bbox) are arrays of [x1, y1, x2, y2] in pixels, relative to the page dimensions. With these, you can:
- Visually frame a field in a review interface (green highlight if confidence > 95%, orange otherwise)
- Validate position: if a SIRET number isn't in the top 200 pixels of the page, it's probably an extraction error
- Parse tables row by row by using the
type: "table"classification as your starting signal
This is the kind of low-level detail that saves hours of implementation time — versus spending a day debugging a homegrown parser.
Pro tip: in your n8n Function node, split parsing into two stages. First, isolate blocks by type. Then, for "table" blocks, apply amount-specific regex patterns. For "title" blocks, look for invoice numbers with a different pattern. Separating parsing strategies by block type cuts extraction errors by roughly half.
The n8n Workflow
The integration is a single HTTP POST to https://api.mistral.ai/v1/ocr with a Bearer token. No SDK, no special library — n8n handles it natively.
Workflow structure
[Trigger] → [HTTP Request (Mistral OCR)] → [Function: parse by block type] → [Database] → [Notification]
Step 1: the trigger
Depending on your document flow:
- Webhook: a colleague uploads a PDF through a simple form
- Email trigger: n8n watches a dedicated inbox and grabs attachments
- Watch folder: drop a PDF into Google Drive / Nextcloud / NAS → workflow fires
- Schedule: every evening at 7 PM, process the day's documents
Step 2: the Mistral OCR call
An HTTP Request node with these settings:
| Parameter | Value |
|---|---|
| Method | POST |
| URL | https://api.mistral.ai/v1/ocr |
| Auth | Bearer Token — your Mistral API key |
| Body | JSON |
For a document accessible by URL:
{
"model": "mistral-ocr-4-latest",
"document": {
"type": "document_url",
"document_url": "https://your-storage.com/invoice-2026-07.pdf"
},
"include_paragraph_bbox": true,
"confidence_scores_granularity": "page"
}
If the document comes from an n8n binary data stream (direct upload), pass it as base64:
{
"model": "mistral-ocr-4-latest",
"document": {
"type": "image_url",
"image_url": "data:application/pdf;base64,{{ $json.base64 }}"
}
}
Gotcha #1: the pages parameter is 0-indexed. Page 1 of a PDF is pages: [0], not [1]. For a 3-page document, pages: [0, 1, 2] is correct. This is the kind of off-by-one that wastes 20 minutes of debugging.
Gotcha #2: confidence scores are off by default. If you want to know when Mistral is uncertain, you must explicitly pass confidence_scores_granularity: "word" or "page". Without it, no scores, no alerts on shaky extractions.
Step 3: smart parsing
Instead of a single catch-all regex, use block classification to apply different strategies:
"title"block → look for an invoice number (pattern likeINV-\d{4}-\d{4})"table"block → look for amount lines, extract the last row for the total"paragraph"block → look for a VAT number, due date, company name
Validate every extracted field against known formats:
- Tax ID formats (SIRET, VAT number)
- Tax rates: must be realistic (20%, 10%, 5.5%, 2.1% for France)
- Due date: must be after the issue date
- Total check: subtotal + tax should match the grand total (within rounding)
If any validation fails, the rule is simple: don't push to accounting. Route to the review queue. An incorrect invoice entry in accounting takes longer to untangle than the time saved on data entry.
Step 4: storage and routing
Structured data flows to:
- Your database (PostgreSQL, Airtable, Google Sheets)
- Your accounting software via API (QuickBooks, Xero, Sage)
- A Slack / email notification: "New invoice processed — pending validation"
Build a three-tier routing system based on confidence scores:
[Confidence > 95%] → Accounting (automatic)
[Confidence 80-95%] → Quick review (Slack notification with summary)
[Confidence < 80%] → Full review (notification + attachment)
This three-tier approach avoids two traps: pushing bad data to accounting, and drowning your team in false alerts for perfectly reliable extractions.
Practical Use Cases
Expense report processing: your sales rep comes back from a trip with 15 restaurant receipts, 2 hotel invoices, and a toll ticket. Snap a photo → upload → OCR → extract → reconcile with bank statement. Done before the receipts hit the expense envelope. If each expense is processed in 30 seconds instead of 5 minutes, that's 20 hours per year per traveling employee recovered.
Contract archiving: 200 old contracts to digitize into the knowledge base. Batch API at $2 per 1,000 pages, automatic document type classification, and every contract becomes full-text searchable. Without OCR, this is a 3-week internship. With OCR 4, it's a single n8n workflow running in an afternoon.
Vendor invoice ingestion: a supplier still sends PDFs by email. n8n grabs the attachment, OCR 4 extracts the fields, your accountant gets a pre-filled validation form. Savings: 4 minutes per invoice. At 50 invoices per month: over 40 hours per year — a full working week.
Where It Can Break
OCR 4 is impressive, but it has blind spots. Heavy handwriting degrades accuracy significantly. Nested tables in aggressively designed invoices can confuse block classification. Very small fonts (below 8pt) sometimes get skipped.
The official benchmarks also document artifacts: page headers misidentified as content, equations split across columns, text lines lost in multi-column tables. These cases exist. The countermeasure is confidence scoring coupled with business validation — not blind trust in the OCR output.
The real challenge isn't technical — it's operational. Automating document processing means accepting fewer manual checks. You need to define the confidence threshold for human review, train your team on the new workflow, and — hardest of all — resist the urge to double-check everything "just in case" during the first weeks.
If you need help designing, testing, and deploying this kind of workflow for your company — from the API call all the way to accounting integration — I can build it.
Also available: Read in French