Skip to content

Integrations

Mistral Parser

Extract text, tables, and images from PDF documents

Use Mistral's OCR API to extract text and page structure from a PDF uploaded to Sim or passed in as a file from a previous block. The current parser returns page Markdown, image metadata, the model, and usage information. Specific Pages accepts zero-based indices such as 0,1,2; leave it empty to process all pages. The block offers Markdown, plain-text, and JSON format values, but its current result uses the structured page output documented below. Turn on Extract Images to get the images Mistral finds in the document (figures, logos, photos) as files on the images output, up to 100 per parse; each page's image entry carries a file_name matching its file. Max Images and Min Image Size (advanced) narrow what is extracted. Tables keeps tables inline in the page Markdown by default, or returns them separately as Markdown or HTML in each page's tables list.

Use the block

Extract text, tables, and images from an uploaded PDF or a file from a previous block. Images come back as files an agent can pass on.

Actions

Mistral PDF Parser

Parse PDF documents using Mistral OCR API

Inputs and outputs

Input

ParameterTypeRequiredDescription
filefileYesNormalized UserFile from file upload or file reference
resultTypestringNoLegacy parser output format (markdown, text, or json; default markdown). Versions 2 and 3 return structured OCR pages regardless of this value.
includeImageBase64booleanNoExtract the images in the document (figures, logos, photos) as files on the images output
pagesarrayNoSpecific pages to process (array of page numbers, starting from 0)
imageLimitnumberNoMaximum number of images to extract (at most 100)
imageMinSizenumberNoMinimum height and width of images to extract from the PDF
tableFormatstringNoReturn tables separately on each page as markdown or html instead of inline in the page markdown
apiKeystringYesMistral API key (MISTRAL_API_KEY)

Output

ParameterTypeDescription
pagesarrayArray of page objects from Mistral OCR
↳ indexnumberPage index (zero-based)
↳ markdownstringExtracted markdown content
↳ imagesarrayImages extracted from this page with bounding boxes
↳ idstringImage identifier (e.g., img-0.jpeg)
↳ top_left_xnumberTop-left X coordinate in pixels
↳ top_left_ynumberTop-left Y coordinate in pixels
↳ bottom_right_xnumberBottom-right X coordinate in pixels
↳ bottom_right_ynumberBottom-right Y coordinate in pixels
↳ file_namestringName of this image in the images output; present only when image extraction is on
↳ dimensionsobjectPage dimensions
↳ dpinumberDots per inch
↳ heightnumberPage height in pixels
↳ widthnumberPage width in pixels
↳ tablesarraySeparate table objects ({ id, content, format }), referenced from the markdown via placeholders like [tbl-0.html]. Populated only when tableFormat is markdown or html; otherwise tables stay inline in the markdown and this list is empty
↳ hyperlinksarrayArray of URL strings detected in the page
↳ headerstringPage header content. Mistral returns it only when extract_header is true (it defaults to false); Sim never sets it, so this is not returned
↳ footerstringPage footer content. Mistral returns it only when extract_footer is true (it defaults to false); Sim never sets it, so this is not returned
modelstringMistral OCR model identifier (e.g., mistral-ocr-latest)
usage_infoobjectUsage and processing statistics
↳ pages_processednumberTotal number of pages processed
↳ doc_size_bytesnumberDocument file size in bytes
document_annotationstringStructured annotation data as JSON string (when applicable)
imagesfile[]Images extracted from the document, named page-<index>-<image id> with the extension of the detected image type; empty unless image extraction is on
Was this helpful?
Suggest an edit