Mistral OCR 4 overview
Mistral OCR 4 by Mistral AI
Advanced OCR by Mistral AI that turns documents, PDFs, and images into structured, AI-ready data with high accuracy and speed.
Mistral OCR 4 specs
- Model ID
mistral/mistral-ocr-4- Developer
- Mistral AI
- Input
- Image, Text
- Output
- Text
- Endpoint
POST https://api.aimlapi.com/v1/ocr
What is Mistral OCR 4 API?
Mistral OCR 4is an advanced document processing technology that converts unstructured visual content into structured digital information. Instead of simply detecting characters on a page, it interprets how information is organized and what it means within the document.
It is commonly used in workflows involving PDF digitization, scanned document conversion, invoice processing, and enterprise data extraction. The system is designed to support modern AI pipelines where raw documents must be turned into clean, structured datasets.
Technical Specifications
| Category | Specification |
|---|---|
| Model Name | Mistral OCR 4 |
| Developer | Mistral AI |
| Model Type | AI-powered Optical Character Recognition (OCR) system |
| Core Function | Document text extraction, structure recognition, and layout-aware parsing |
| Input Formats | Images, scanned documents, PDFs, photographed pages |
| Output Formats | Structured text, JSON, Markdown |
High-Accuracy Text Extraction in Real-World Conditions
Mistral OCR 4 delivers high-accuracy text extraction across a wide range of document conditions, including low-quality scans, photographed pages, and digitally compressed files. It reduces common recognition errors such as broken words, misplaced characters, and inconsistent spacing.
Layout Preservation and Document Structure Understanding
The system is capable of preserving visual hierarchy within documents. Tables, forms, multi-column layouts, headers, and footers are interpreted as structured components rather than flat text, allowing downstream systems to work with cleaner and more organized data.
Multilingual Document Processing
Another key capability is multilingual recognition, enabling the processing of documents that contain multiple languages within the same file. This makes it suitable for global organizations operating across different regions and markets.
Handwriting Recognition Support
Handwritten content support is also included, allowing the system to extract meaningful text from notes, forms, and annotations that are not digitally typed. While handwriting remains more challenging than printed text, the model is optimized to improve recognition reliability in these scenarios.
Use cases
Document parsing and extraction: Mistral OCR 4 is documented as suited to extracting structure and content from complex, multilingual documents, including PDFs and other document types.
Retrieval-augmented generation: It is documented as suited to producing structured, classified, citation-ready content for semantic chunking and source-grounded answers in RAG pipelines.
Agentic workflows: It is documented as suited to workflows where agents need document structure to complete tasks such as form filling, invoice processing, and compliance checks.
Enterprise search and knowledge bases: It is documented as suited to turning documents into an OCR data source for custom ingestion, entity extraction, and searchable knowledge bases.
How to use the Mistral OCR 4 API
View docsBuild with your agent
Give your agent the model details, code and documentation.
1Get your API key
Create API keyexport AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"2Make your first request
curl 'https://api.aimlapi.com/v1/ocr' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "mistral/mistral-ocr-4",
"document": null
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "mistral/mistral-ocr-4",
"document": null
}
response = requests.post("https://api.aimlapi.com/v1/ocr", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/ocr", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "mistral/mistral-ocr-4",
"document": null
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Related articles
Mistral OCR 4 FAQ
What inputs and outputs does Mistral OCR 4 support?
Mistral OCR 4 takes document, image as input and returns text.
How much does Mistral OCR 4 cost?
Mistral OCR 4 is priced at $5.2 / 1K pages.
How is Mistral OCR 4 billed?
Mistral OCR 4 is billed per generation, a fixed charge per output rather than by prompt length.
Who created Mistral OCR 4?
Mistral OCR 4 was built by Mistral AI.
How do I call Mistral OCR 4 on AI/ML API?
Use mistral/mistral-ocr-4 as the model id on AI/ML API.
Is Mistral OCR 4 available through a single API key?
Yes. Mistral OCR 4 is served through AI/ML API, so the same key and endpoint format used for other models applies.
Does Mistral OCR 4 provide bounding box data for extracted content?
Yes. It adds native paragraph-level bounding box extraction along with structural block labels.
What kinds of files can Mistral OCR 4 process?
It processes PDFs and images, extracting text, tables, and images from them.
Is Mistral OCR 4 compatible with earlier Mistral OCR versions?
Yes, it is fully backward compatible with Mistral OCR 3.
What is the Mistral OCR 4 model ID?
Use mistral/mistral-ocr-4 as the model parameter. Requests go to https://api.aimlapi.com/v1/ocr with your AI/ML API key.
