OCRRouter

Mistral OCR API docs

How OCRRouter calls Mistral OCR, what the upstream returns field by field, and how that becomes Markdown and JSON blocks.

Overview

Mistral OCR is Mistral AI's document OCR model. It returns one Markdown string per page, plus extracted images and, on newer versions, separate tables, headers and footers.

OCRRouter sends the whole file in one request and keeps the Markdown of each page. With no Mistral key set, the same model is reached through OpenParser.

Price and limits

Model ID
mistral/mistral-ocr
Price
25 credits / page ($25 per 1,000 pages)
Max pages per request
1,000
Inputs
PDF; PNG, JPEG and other images, sent inline as base64 data URLs
Languages
100+ languages
Positions (bbox)
Yes, when the upstream returns them
  • Up to 1,000 pages per document in OCRRouter
  • Whole file is sent inline in one request

You pay only for pages that succeed. A failed attempt that falls back to another model is not charged. See pricing.

How OCRRouter calls it

Endpoint
POST https://api.mistral.ai/v1/ocr
Model
MISTRAL_OCR_MODEL, default mistral-ocr-latest
Document
PDF as { type: "document_url", document_url: data URL }; images as { type: "image_url", image_url: data URL }
Auth
Bearer token from the Mistral API key
Fallback
No Mistral key: OpenParser POST /parse with model OPENPARSER_MISTRAL_MODEL, default mistral-ocr-4-1

Options

What OCRRouter sets on the upstream call. You choose the model, format and pages in your request; vendor-specific options are not passed through.

model
From MISTRAL_OCR_MODEL, default mistral-ocr-latest
document
Inline data URL; no page selection
Not set
table_format, extract_header, extract_footer, include_image_base64, annotations: Mistral defaults apply
Client options
Clients cannot pass Mistral-specific options through OCRRouter

Raw response fields

Every field the upstream documents, with its type and meaning taken from the vendor's own reference. Fields marked "read by OCRRouter" are the ones our connector uses; the rest are listed so you know what the engine produces.

Mistral OCR response

Body returned by POST /v1/ocr. Field names and meanings follow Mistral's API reference and its official SDK types.

Source: Mistral API reference: OCR, retrieved 2026-11-19

pagesarray, read by OCRRouter
OCR result for each page.
pages[].indexinteger
Page index in the document, starting from 0.Example: 0
pages[].markdownstring, read by OCRRouter
Markdown text of the page. The main output.Example: "# LEVERAGING UNLABELED DATA..."
pages[].imagesarray
Images extracted from the page.
pages[].images[].idstring
Image ID, referenced from the Markdown.Example: "img-0.jpeg"
pages[].images[].top_left_xinteger | null
X of the image's top-left corner.Example: 292
pages[].images[].top_left_yinteger | null
Y of the image's top-left corner.Example: 217
pages[].images[].bottom_right_xinteger | null
X of the image's bottom-right corner.Example: 1405
pages[].images[].bottom_right_yinteger | null
Y of the image's bottom-right corner.Example: 649
pages[].images[].image_base64string | null
Base64 of the extracted image, when include_image_base64 is set.
pages[].images[].image_annotationstring | null
Image annotation as a JSON string, when requested.
pages[].tablesarray
Tables extracted from the page, when table_format is markdown or html (OCR 2512 or newer).
pages[].tables[].idstring
Table ID.
pages[].tables[].contentstring
Table content in the requested format.
pages[].tables[].formatstring
Table format, markdown or html.
pages[].hyperlinksstring[]
Hyperlinks found on the page.
pages[].headerstring | null
Page header, when extract_header is true.
pages[].footerstring | null
Page footer, when extract_footer is true.
pages[].dimensionsobject | null
Size of the page image Mistral rendered.
pages[].dimensions.dpiinteger
Dots per inch of the page image.Example: 200
pages[].dimensions.heightinteger
Page image height in pixels.Example: 2200
pages[].dimensions.widthinteger
Page image width in pixels.Example: 1700
pages[].confidence_scoresobject | null
Confidence scores, when confidence_scores_granularity is set.
pages[].blocksarray | null
Paragraph-level blocks with bounding boxes in reading order, when include_blocks is true.
modelstring
Model that produced the OCR.Example: "mistral-ocr-2503-completion"
document_annotationstring | null
Structured output in the requested format, as a JSON string.
usage_info.pages_processedinteger
Number of pages processed.Example: 29
usage_info.doc_size_bytesinteger | null
Document size in bytes.Example: null

Shape from Mistral's API reference example; pages and text shortened.

{"pages": [{"index": 1,"markdown": "# LEVERAGING UNLABELED DATA TO PREDICT OUT-OF-D…","images": [],"dimensions": { "dpi": 200, "height": 2200, "width": 1700 }},{"index": 2,"markdown": "![img-0.jpeg](img-0.jpeg)\nFigure 1: ...","images": [{"id": "img-0.jpeg","top_left_x": 292,"top_left_y": 217,"bottom_right_x": 1405,"bottom_right_y": 649,"image_base64": "..."}],"dimensions": { "dpi": 200, "height": 2200, "width": 1700 }}],"model": "mistral-ocr-2503-completion","usage_info": { "pages_processed": 29, "doc_size_bytes": null }}

How it maps to OCRRouter output

pages[].markdown
pages[]: one Markdown string per page, in response order
pages empty
Request fails with "Provider returned no pages"
images, tables, header, footer, dimensions
Not used; image references stay in the Markdown as written
Layout and confidence
None from the direct path, so no bbox or confidence in OCRRouter output

The unified output is described in Response format.

Example request

curl https://api.ocrrouter.ai/v1/ocr \
  -H "Authorization: Bearer $OCRROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistral/mistral-ocr",
    "file_url": "https://example.com/invoice.pdf",
    "format": "json"
  }'

Sources

Vendor documentation read on 2026-11-19.