v2

latestOpenAPI 3.1.02026-07-2670186350.6 KB
ocr

Process Ocr

Process a document using OCR (Optical Character Recognition).

This endpoint extracts text and structure from documents (PDFs, images) and returns the content in markdown format. It supports multiple document types and can extract images embedded within documents.

The extracted markdown preserves document structure including headings, tables, lists, and other formatting.

post/ocr

Request body

modelstring required

The OCR model to use

pagesinteger[] nullable

Specific page indices to process (0-based). If not specified, all pages are processed.

include_image_base64boolean

Whether to include base64-encoded images in the response

image_limitinteger nullable

Maximum number of images to extract per page

image_min_sizeinteger nullable

Minimum size (width or height in pixels) for images to be included

Example request

{
  "model": "mistral/mistral-ocr-latest",
  "document": {
    "type": "document_url"
  },
  "docling_extra": {
    "output_format": "markdown",
    "ocr_engine": "easyocr",
    "lang": [
      "sv",
      "en"
    ],
    "table_mode": "fast",
    "images_scale": 1
  }
}

Response

Successful Response

idstring required

Unique identifier for this OCR request

modelstring required

The model used for OCR