ReferenceInformation-oriented
Mistral OCR 3 API Reference
Complete reference for endpoints, parameters, response formats, and pricing.
API Endpoints
POST
/v1/ocrProcess a single document and return extracted text as markdown.
POST
/v1/ocr/batchSubmit multiple documents for batch processing (50% cost savings).
GET
/v1/ocr/batch/{batch_id}Check status and retrieve results of a batch job.
Base URL
https://api.mistral.aiRequest Parameters
POST /v1/ocr
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model ID: mistral-ocr-2512 |
| document | object | Yes | Document object (see below) |
Document Object
| Field | Type | Description |
|---|---|---|
| type | string | Document type: pdf | image |
| data | string | Base64-encoded document content (mutually exclusive with url) |
| url | string | Public URL to document (mutually exclusive with data) |
Response Format
{
"id": "ocr-abc123",
"object": "ocr.document",
"created": 1735123456,
"model": "mistral-ocr-2512",
"content": "# Document Title\n\nExtracted markdown content...",
"pages": 5,
"usage": {
"prompt_tokens": 0,
"completion_tokens": 2847,
"total_tokens": 2847
}
}| Field | Type | Description |
|---|---|---|
| id | string | Unique request identifier |
| content | string | Extracted text as markdown (with HTML tables) |
| pages | integer | Number of pages processed |
| usage.total_tokens | integer | Tokens used for billing |
Supported Document Types
PDF Documents
- - Native PDFs (text embedded)
- - Scanned PDFs (image-based)
- - Multi-page documents
- - Max size: 50MB
Images
- - PNG, JPEG, WEBP, GIF
- - TIFF (single page)
- - Max size: 20MB
- - Recommended: 300 DPI+
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
| invalid_api_key | 401 | API key is invalid or missing |
| rate_limit_exceeded | 429 | Too many requests, retry with backoff |
| document_too_large | 413 | Document exceeds size limit |
| invalid_document | 400 | Document is corrupted or invalid format |
| insufficient_credits | 402 | Account has insufficient credits |
| internal_error | 500 | Server error, retry later |
Rate Limits
Free Tier
- - 100 pages/month
- - 10 requests/minute
- - 5 concurrent requests
Paid Tier
- - Unlimited pages
- - 100 requests/minute
- - 50 concurrent requests
Rate limit headers: X-RateLimit-Remaining, X-RateLimit-Reset
Pricing
Standard API
$2/1000 pages
Real-time processing, immediate results
Batch API
$1/1000 pages
Async processing, 50% cost savings
Billing Notes
- - Minimum charge: 1 page per document
- - Failed requests are not charged
- - Usage tracked via
usage.total_tokensin response
Python SDK
pip install mistralaiClient Initialization
from mistralai import Mistralimport os# Using environment variable (recommended)client = Mistral(api_key=os.environ["MISTRAL_API_KEY"])# Or pass directlyclient = Mistral(api_key="your-api-key")SDK Methods
| Method | Description |
|---|---|
| client.ocr.process() | Process a single document |
| client.ocr.batch_process() | Submit a batch job |
| client.ocr.get_batch() | Get batch job status/results |
Model Information
Model ID:mistral-ocr-2512
Release Date:December 2025
Output Format:Markdown + HTML tables
Context Window:Unlimited (document-based)