> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Mistral OCR

> Document and image OCR

<Note>Source must be a URL (`https://`) or base64-encoded document.</Note>

## Setup

<Note>Set `MISTRAL_API_KEY` in your environment before running `OCRAgent`.</Note>

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import OCRAgent

agent = OCRAgent()
text = agent.read("https://arxiv.org/pdf/2201.04234")
print(text)
```

## With Options

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
result = agent.extract(
    "https://example.com/document.pdf",
    pages=[0, 1, 2],  # 0-indexed
    include_image_base64=True
)
for page in result.pages:
    print(page.markdown)
```

## Models

| Model                        | Description          |
| ---------------------------- | -------------------- |
| `mistral/mistral-ocr-latest` | Latest OCR (default) |
