OCR

Extracts text from files using Mistral Document AI pipeline

post/v1/ocr

Request

  • The document declares no server URL.
  • Auth
    HTTP bearer

Request body

document_annotation_promptstring nullable

Optional prompt to guide the model in extracting structured output from the entire document. A document_annotation_format must be provided.

modelstring required

The model to use for the OCR, call /v1/models endpoint to get the list of available models, only image-to-text model type is supported.

Response

Successful Response

document_annotationstring nullable

Formatted response in the request_format if provided in json str

idstring nullable

The ID of the OCR request.

modelstring nullable

The model used to generate the OCR.

Changes