# Send Mistral PDF OCR to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "extracting-mistral-ocr",
    "name": "Mistral PDF OCR",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/tristanmanchester/extracting-mistral-ocr",
    "canonicalUrl": "https://clawhub.ai/tristanmanchester/extracting-mistral-ocr",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/extracting-mistral-ocr",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=extracting-mistral-ocr",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "scripts/mistral_ocr_extract.py",
      "scripts/requirements.txt",
      "references/mistral_ocr_api.md",
      "references/output_mapping.md",
      "references/annotation_prompts.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "extracting-mistral-ocr",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-05T16:07:29.456Z",
      "expiresAt": "2026-05-12T16:07:29.456Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=extracting-mistral-ocr",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=extracting-mistral-ocr",
        "contentDisposition": "attachment; filename=\"extracting-mistral-ocr-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "extracting-mistral-ocr"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/extracting-mistral-ocr"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/extracting-mistral-ocr",
    "downloadUrl": "https://openagent3.xyz/downloads/extracting-mistral-ocr",
    "agentUrl": "https://openagent3.xyz/skills/extracting-mistral-ocr/agent",
    "manifestUrl": "https://openagent3.xyz/skills/extracting-mistral-ocr/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/extracting-mistral-ocr/agent.md"
  }
}
```
## Documentation

### Quick start (default)

Run the bundled script to OCR a local PDF and write Markdown + JSON outputs:

python {baseDir}/scripts/mistral_ocr_extract.py --input path/to/file.pdf --out out/ocr

Output directory layout:

combined.md (all pages concatenated)
pages/page-000.md (per-page markdown)
raw_response.json (full OCR response)
images/ (decoded embedded images, if requested)
tables/ (separate tables, if requested)

### Workflow

Pick input mode

Local PDF (most common): upload via Files API, then OCR via file_id.
Public URL: OCR directly via document_url.



Choose output fidelity (defaults are safe for RAG)

Keep table_format=inline unless the user explicitly wants tables split out.
Set --include-image-base64 when the user needs figures/diagrams extracted.
Use --extract-header/--extract-footer if header/footer noise hurts downstream search.



Run OCR

Use scripts/mistral_ocr_extract.py to produce a deterministic on-disk artefact set.



(Optional) Structured extraction from the whole document

If the user wants fields (invoice totals, contract parties, etc.), provide an annotation prompt.
The OCR API can return a document-level document_annotation in addition to page markdown.

Example:
python {baseDir}/scripts/mistral_ocr_extract.py \\
  --input invoice.pdf \\
  --out out/invoice \\
  --annotation-prompt "Extract supplier_name, invoice_number, invoice_date (ISO-8601), currency, total_amount. Return JSON." \\
  --annotation-format json_object

### Decision rules

If the PDF is local and not publicly accessible, upload it (the script does this automatically).
If the PDF URL is private or requires authentication, do not pass it as document_url; upload instead.
If output quality is critical, prefer table_format=html for downstream parsing over brittle regex.

### Common failure modes

Missing MISTRAL_API_KEY: set it in the environment before running.
URL OCR fails: the URL likely is not publicly accessible; upload the file.
Large files: upload supports large files, but very large PDFs may need page selection (--pages) or batch processing.

### References

API + parameters: references/mistral_ocr_api.md
Output mapping rules (placeholders to extracted images/tables): references/output_mapping.md
Example annotation prompts for common document types: references/annotation_prompts.md
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: tristanmanchester
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-05T16:07:29.456Z
- Expires at: 2026-05-12T16:07:29.456Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/extracting-mistral-ocr)
- [Send to Agent page](https://openagent3.xyz/skills/extracting-mistral-ocr/agent)
- [JSON manifest](https://openagent3.xyz/skills/extracting-mistral-ocr/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/extracting-mistral-ocr/agent.md)
- [Download page](https://openagent3.xyz/downloads/extracting-mistral-ocr)