# Mistral OCR 4.1 - Core.Today AI API > 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. - **Provider**: Mistral AI - **Model ID**: mistral/ocr-4.1 - **Category**: Image Generation - **Credits**: 9.3 per processed page (settled on the pages Mistral reports) - **Speed**: Fast - **Quality**: Ultra ## Features - 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 ## 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 ## API Endpoint Base URL: https://api.core.today/v1 Create Prediction: POST /predictions Get Status: GET /predictions/{job_id} ## Authentication Header: X-API-Key: YOUR_API_KEY ## Input Parameters ### Required - **document**: string - 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. ### Optional - **pages**: array (default: [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_format**: string - How tables are written inside the page markdown. Omit for Mistral's default (inline markdown tables). Options: markdown, html - **extract_header**: boolean - Return each page's running header separately in `header` instead of inside the markdown. - **extract_footer**: boolean - Return each page's running footer separately in `footer` instead of inside the markdown. - **include_blocks**: boolean - Return paragraph-level bounding boxes and block labels in `blocks` (on by default upstream). Set false for markdown only. ## 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. ```json { "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). ```json { "model": "mistral/ocr-4.1", "input": { "document": "https://example.com/receipt.png", "table_format": "html", "include_blocks": false } } ``` ## Response Format ```json { "job_id": "abc123", "status": "pending | processing | completed | failed", "result": "URL or data (when completed)" } ``` ## Usage Flow 1. POST /predictions with model and input -> receive job_id 2. GET /predictions/{job_id} -> poll until status is completed or failed 3. Result contains output URL(s) ## Tips - The 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 - Only 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 - The document URL must be reachable from the public internet - upload private files with create_upload_url / POST /v1/files and pass the signed URL - Join pages[].markdown with blank lines to feed the whole document to an LLM - Structured annotation extraction and embedded base64 images are not exposed through this model ## Documentation https://docs.mistral.ai/models/ocr-4-1