Mistral OCR
Extract text, tables, and images from PDFs or images using Mistral OCR API and output in Markdown, JSON, or HTML formats.
LeyuDame2
@yzdame
What This Skill Does
Converts PDFs and images into Markdown, JSON, or HTML using the Mistral OCR API. Supports table recognition, image extraction, header/footer handling, and multi-column layouts.
Replaces manual transcription or local OCR tools by providing cloud-based, high-accuracy text extraction with structured output.
When to Use It
- Extract text and tables from scanned PDFs for editing or analysis
- Convert image-based documents into searchable Markdown files
- Export PDF content as JSON for programmatic processing
- Generate HTML versions of documents for web publishing
- Process multi-column layouts or documents with complex formatting
Install
$ openclaw skills install @yzdame/mistral-ocr⚠️ Privacy Warning - 隐私警告
IMPORTANT - READ BEFORE INSTALLING:
This skill uploads your files to Mistral's cloud servers for OCR processing.
Do NOT use with sensitive or confidential documents unless:
- You trust Mistral's data handling policies
- You have reviewed Mistral's privacy policy
- You accept that file contents will be transmitted and processed remotely
For sensitive documents, use offline/local OCR tools instead.
Mistral OCR Skill
A powerful OCR tool that converts PDF files and images into Markdown, JSON, or HTML formats using Mistral's state-of-the-art OCR API.
Installation
# Clone or download this repository
git clone https://github.com/YZDame/Mistral-OCR-SKILL.git
cd Mistral-OCR-SKILL
# Install dependencies
pip install -r requirements.txt
🔑 API Key Setup (Required)
Get your API key: 👉 https://console.mistral.ai/home
Set the environment variable:
export MISTRAL_API_KEY=your_api_key
CLI Usage
cd scripts
# Process PDF to Markdown
python3 mistral_ocr.py -i input.pdf
# Process PDF to JSON
python3 mistral_ocr.py -i input.pdf -f json
# Specify output directory
python3 mistral_ocr.py -i input.pdf -o ~/my_ocr_results
Arguments
| Flag | Description |
|---|---|
-i, --input | Input file path (required) |
-f, --format | Output format: markdown/json/html (default: markdown) |
-o, --output | Output directory |
Data Privacy
What happens to your files:
- Files are uploaded to Mistral's OCR API
- Files are processed on Mistral servers
- Processing results are returned to you
- Files are not stored on Mistral servers (per Mistral policy)
For more details, see: https://mistral.ai/privacy-policy
License
MIT
Top skills in this category
API Gateway
@byungkyuConnect to external services through Maton-managed API routes. Use this skill only after the user names the target app, account, and task. Start with read/list calls when possible and follow the app-specific reference before any change.
Nano Pdf
@steipeteEdit PDFs with natural-language instructions using the nano-pdf CLI.
Word / DOCX
@ivangdavilaCreate, inspect, and edit Microsoft Word documents and DOCX files with reliable styles, numbering, tracked changes, tables, sections, and compatibility check...
Excel / XLSX
@ivangdavilaCreate, inspect, and edit Microsoft Excel workbooks and XLSX files with reliable formulas, dates, types, formatting, recalculation, and template preservation...
Markdown Converter
@steipeteConvert documents and files to Markdown using markitdown. Use when converting PDF, Word (.docx), PowerPoint (.pptx), Excel (.xlsx, .xls), HTML, CSV, JSON, XML, images (with EXIF/OCR), audio (with transcription), ZIP archives, YouTube URLs, or EPubs to Markdown format for LLM processing or text analysis.