Skip to main content
Billing note Billing is per processed page. Credits for the requested page count are reserved when the job starts (93 credits for the default first 10 pages) and the difference is refunded once Mistral reports how many pages it actually processed - a 1-page PDF or an image is charged for 1 page. To process more than the first 10 pages, pass `pages` explicitly.
Mistral AIFastUltra

Mistral OCR 4.1

Mistral's document OCR - turns PDFs and images into clean per-page markdown with tables, reading order, paragraph-level bounding boxes and block labels. Billed per processed page (9.3 credits/page); the first 10 pages are processed unless `pages` is given.

93 credits
per processed page (settled on the pages Mistral reports)
PDF and image input (JPEG, PNG, WEBP, GIF, BMP, TIFF, HEIF, AVIF)
Per-page markdown with tables and reading order
Paragraph-level bounding boxes and block labels
Optional header / footer extraction and HTML tables
Pay only for pages actually processed

Run it right now

Test this model instantly in the Console Playground โ€” no code required

Sign in to try

Use with AI Assistant

Copy usage instructions for Claude, ChatGPT, or other AI

Quick Start

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cdt_your_api_key" \
  -d '{
  "model": "mistral/ocr-4.1",
  "input": {
    "document": "https://arxiv.org/pdf/2201.04234",
    "pages": [
      0,
      1
    ]
  }
}'

Parameters

ParameterTypeRequiredDefaultDescription
documentstringYes-URL of the document - a PDF or an image (JPEG, PNG, WEBP, GIF, BMP, TIFF, HEIF, AVIF). Mistral downloads it directly, so the URL must be publicly reachable. Up to 50MB.
pagesarrayNo[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]0-based page indexes to process (up to 1,000). Defaults to the first 10 pages. Indexes beyond the end of the document are ignored and not billed. Images are always one page.
table_formatstringNo-How tables are written inside the page markdown. Omit for Mistral's default (inline markdown tables).
markdownhtml
extract_headerbooleanNo-Return each page's running header separately in `header` instead of inside the markdown.
extract_footerbooleanNo-Return each page's running footer separately in `footer` instead of inside the markdown.
include_blocksbooleanNo-Return paragraph-level bounding boxes and block labels in `blocks` (on by default upstream). Set false for markdown only.

How to Provide File Input

There are 3 ways to provide files for the document parameter:

Recommended

Image URL

Pass a publicly accessible URL directly. With the Storage API (POST /v1/files/upload-url) the file uploads straight to S3 (50MB per file) and you pass the returned file_url.

{
  "model": "mistral/ocr-4.1",
  "input": {
    "prompt": "your prompt here",
    "document": "https://example.com/image.jpg"
  }
}

Direct Upload (Multipart)

Attach files directly to POST /v1/predictions/upload. No separate upload step, but the bytes pass through the API server so the whole request is capped at 10MB.

curl -X POST "https://api.core.today/v1/predictions/upload" \
  -H "X-API-Key: cdt_your_api_key" \
  -F "model=mistral/ocr-4.1" \
  -F 'input={"prompt":"your prompt here"}' \
  -F "file:document=@your_file.png"
See the File Upload docs for more upload methods including Presigned URLs.

Common Parameters

Common parameters used when calling POST /v1/predictions.

ParameterTypeRequiredDefaultDescription
modelstringYes-Model identifier
inputobjectYes-Object containing the model-specific parameters from the table above
output_folderstringNo-Folder path for output files (max 256 chars, '..' not allowed)
webhook_urlstringNo-Webhook URL to call on completion
is_publicbooleanNofalseIf true, output files are also available via permanent public URLs

Examples

First two pages of a paper

Returns {pages[], model, usage_info} - each page has markdown, tables, hyperlinks, dimensions and blocks. usage_info.pages_processed is the billed page count.

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cdt_your_api_key" \
  -d '{
  "model": "mistral/ocr-4.1",
  "input": {
    "document": "https://arxiv.org/pdf/2201.04234",
    "pages": [
      0,
      1
    ]
  }
}'

Receipt image with HTML tables

An image is one page (about 10 credits).

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cdt_your_api_key" \
  -d '{
  "model": "mistral/ocr-4.1",
  "input": {
    "document": "https://example.com/receipt.png",
    "table_format": "html",
    "include_blocks": false
  }
}'

Tips & Best Practices

1The result is Mistral's response body as-is: pages[].markdown is the text, pages[].blocks carries the bounding boxes, usage_info.pages_processed is what you were billed for
2Only the first 10 pages are processed by default - pass pages (e.g. [0, 1, ..., 49]) for longer documents; you are still charged only for pages that exist
3The document URL must be reachable from the public internet - upload private files with create_upload_url / POST /v1/files and pass the signed URL
4Join pages[].markdown with blank lines to feed the whole document to an LLM
5Structured annotation extraction and embedded base64 images are not exposed through this model

Use Cases

Turning contracts, reports and papers into LLM-ready markdown
Receipt, invoice and form digitization
Building RAG indexes from scanned PDFs
Table extraction from financial documents