[Integrations](https://spiral.ai/integrations) › [n8n](https://spiral.ai/integrations/n8n) › [Mistral OCR document extraction](https://spiral.ai/integrations/n8n/mistral-ocr-document-extraction)

# How to Use Mistral OCR document extraction in n8n

Extracts page-by-page Markdown, tables, images, and document structure from PDFs and images. Use it to turn reports or scanned documents into readable content, with annotations when you need structured records.

|  |  |
| --- | --- |
| Model | Mistral OCR document extraction |
| Available through | Mistral |
| Category | Data |
| Price | $0.0052 per page ($0.0065 with document or bounding-box annotations). |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, with a Spiral API key |

## Prompts to try with Mistral OCR document extraction in n8n

- Every Monday, use Mistral OCR document extraction on https://arxiv.org/pdf/1706.03762 if the PDF has changed, then refresh its extracted section index.
- Each morning, check https://arxiv.org/pdf/2201.04234 for a changed PDF and use Mistral OCR document extraction to refresh its tables when needed.
- Every Friday, use Mistral OCR document extraction on https://arxiv.org/pdf/2410.07073 if it has changed and prepare a list of its extracted figures and captions.
- Once a month, use Mistral OCR document extraction on https://arxiv.org/pdf/2302.13971 and compare the extracted headings and tables with the previous run.
- Every Sunday, use Mistral OCR document extraction on the first ten pages of https://arxiv.org/pdf/1511.08771 and compare the extracted text with the previous run.

## How to set up Mistral OCR document extraction in n8n

Pick the way that suits you. Each takes about two minutes.

### Use the Spiral skill

1. **Send n8n this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use Spiral's MCP server

1. **Create a key**: Create a key under API keys in the console.

2. **Add an MCP Client node**: In a workflow, add an MCP Client node (or, under an AI Agent node, an MCP Client Tool) and set:

```text
https://api.spiral.ai/mcp
```

3. **Pick a tool**: The node lists Spiral's tools. In an MCP Client node pick one, such as `run`, and give it its arguments:

```json
{
  "provider": "fal",
  "model": "fal-ai/flux/schnell",
  "input": { "prompt": "a lighthouse at dawn" },
  "wait": true
}
```

4. **Run Mistral OCR document extraction in a workflow step**: Give the step an instruction like the ones below and run it on your trigger or schedule. Spiral finds Mistral OCR document extraction, prices it and runs it each time the step fires.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run Mistral OCR document extraction**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "mistral",
    "model": "mistral-ocr-latest",
    "input": {
      "document": {
        "document_url": "<document_url>"
      }
    }
  }'
```

Then paste one of the prompts above: n8n finds Mistral OCR document extraction on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/n8n

## Mistral OCR document extraction tools and prices

- [Mistral OCR Latest](https://spiral.ai/tools/mistral/mistral-ocr-latest) (Mistral): $0.0052 per page ($0.0065 with document or bounding-box annotations).

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| pages |  | — | Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0. |
| image_limit |  | — | Max images to extract |
| table_format | markdown, html | — |  |
| extract_footer |  | false | Extract the page footer into the response's `footer` field and remove it from the markdown content |
| extract_header |  | false | Extract the page header into the response's `header` field and remove it from the markdown content |
| image_min_size |  | — | Minimum height and width of image to extract |

## What can you do with Mistral OCR document extraction in n8n?

Keep a research reading queue supplied with extracted text and tables as new PDFs arrive. A scheduled agent can process documents through Mistral OCR and assemble page-based indexes or figure lists for later review.

### Make research papers searchable

Convert paper PDFs into Markdown and organize extracted sections by page for a research search index.

### Compare tables across published reports

Extract tables from annual reports, then compare matching rows while retaining their source pages.

### Turn equipment manuals into reference material

Extract manual text, tables, and diagrams so a support assistant can work from the supplied documentation.

### Build a figure catalog

Collect extracted figures and their page locations, then request individual figure annotations for a browsable research catalog.

### Prepare document review overlays

Use paragraph bounding boxes and structural labels to connect extracted content with the corresponding region of a document page.

### Create structured report records

Use document annotations to extract selected titles, reporting periods, and other stated details into a consistent JSON structure.

### Digitize multilingual publications

Extract text from English, French, German, and Spanish publications for a searchable archive that retains the original wording.

## Overview

- [Mistral](https://spiral.ai/providers/mistral)
- [All n8n guides](https://spiral.ai/integrations/n8n)

## Mistral OCR document extraction in other agents

- [Amp](https://spiral.ai/integrations/amp/mistral-ocr-document-extraction)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/mistral-ocr-document-extraction)
- [Claude](https://spiral.ai/integrations/claude-desktop/mistral-ocr-document-extraction)
- [Claude Code](https://spiral.ai/integrations/claude-code/mistral-ocr-document-extraction)
- [Cline](https://spiral.ai/integrations/cline/mistral-ocr-document-extraction)
- [Codex](https://spiral.ai/integrations/codex/mistral-ocr-document-extraction)
- [Cursor](https://spiral.ai/integrations/cursor/mistral-ocr-document-extraction)
- [Devin](https://spiral.ai/integrations/devin/mistral-ocr-document-extraction)
- [dots](https://spiral.ai/integrations/dots/mistral-ocr-document-extraction)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/mistral-ocr-document-extraction)
- [Gemini](https://spiral.ai/integrations/gemini/mistral-ocr-document-extraction)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/mistral-ocr-document-extraction)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/mistral-ocr-document-extraction)
- [goose](https://spiral.ai/integrations/goose/mistral-ocr-document-extraction)
- [Grok](https://spiral.ai/integrations/grok/mistral-ocr-document-extraction)
- [Grok Build](https://spiral.ai/integrations/grok-build/mistral-ocr-document-extraction)
- [Hermes](https://spiral.ai/integrations/hermes/mistral-ocr-document-extraction)
- [Instinct](https://spiral.ai/integrations/instinct/mistral-ocr-document-extraction)
- [Manus](https://spiral.ai/integrations/manus/mistral-ocr-document-extraction)
- [Muse](https://spiral.ai/integrations/muse/mistral-ocr-document-extraction)
- [Muse Code](https://spiral.ai/integrations/muse-code/mistral-ocr-document-extraction)
- [Notion](https://spiral.ai/integrations/notion/mistral-ocr-document-extraction)
- [OpenClaw](https://spiral.ai/integrations/openclaw/mistral-ocr-document-extraction)
- [opencode](https://spiral.ai/integrations/opencode/mistral-ocr-document-extraction)
- [Perplexity](https://spiral.ai/integrations/perplexity/mistral-ocr-document-extraction)
- [Raycast](https://spiral.ai/integrations/raycast/mistral-ocr-document-extraction)
- [VS Code](https://spiral.ai/integrations/vscode/mistral-ocr-document-extraction)
- [Windsurf](https://spiral.ai/integrations/windsurf/mistral-ocr-document-extraction)
- [Zapier](https://spiral.ai/integrations/zapier/mistral-ocr-document-extraction)

## More n8n guides

- [Mistral OCR 4.1](https://spiral.ai/integrations/n8n/mistral-ocr-4-1)
- [Mistral document OCR](https://spiral.ai/integrations/n8n/mistral-document-ocr)
- [GitHub user repositories](https://spiral.ai/integrations/n8n/github-user-repositories)
- [Mistral document text and table extraction](https://spiral.ai/integrations/n8n/mistral-document-text-and-table-extraction)
- [GitHub user pull requests](https://spiral.ai/integrations/n8n/github-user-pull-requests)
- [Mistral document text extraction](https://spiral.ai/integrations/n8n/mistral-document-text-extraction)

## Questions about Mistral OCR document extraction in n8n

**Can n8n use Mistral OCR document extraction?**

Yes. Add Spiral to n8n as an MCP server, and n8n can find and run Mistral OCR document extraction like any built-in tool.

**How much does Mistral OCR document extraction cost in n8n?**

$0.0052 per page ($0.0065 with document or bounding-box annotations). You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your n8n plan is separate.

**Do I need a Mistral account to use Mistral OCR document extraction in n8n?**

You need no Mistral account. n8n uses one Spiral API key for every tool, and Spiral runs Mistral OCR document extraction on its own Mistral account.

**How long does it take to set up Mistral OCR document extraction in n8n?**

About two minutes: create a key, then add an MCP Client node, then pick a tool.

**Does n8n wait while Mistral OCR document extraction runs?**

Mistral OCR document extraction runs in the background. n8n starts the run, checks on it and gives you the json when it's ready.

**How large can a document be?**

Mistral's chunking cookbook identifies limits of 50 MB and 1,000 pages. For larger documents, it recommends splitting the file, processing the pieces, and combining their results.

**Which languages can Mistral OCR read?**

The documented OCR language list includes English, French, German, Spanish, Portuguese, Italian, Dutch, Polish, and Czech. Coverage extends beyond English-language documents.

**Does document-level annotation inspect every extracted image?**

It receives the OCR Markdown plus the first eight extracted image bounding boxes. For figure-heavy documents, use annotations on individual extracted figures when you need descriptions beyond that boundary.

**Does the latest OCR model stay fixed?**

The latest alias can change: Mistral's changelog currently points it to OCR 4.1. The OCR response also identifies which model produced the extraction.

**How can I check recognition quality?**

OCR 4.1 supports paragraph locations, structural labels, and block-level confidence scores, which can help target a review. Mistral also acknowledges that generated output can be inaccurate.

