extracting-mistral-ocr
Installation
SKILL.md
Extract documents with Mistral OCR
Use OCR for scanned or image-based content, not as the default for every PDF. Check available text and page images first. Establish that the user permits sending the document to Mistral, especially for personal, medical, legal, or confidential material. Never upload more pages or files than needed.
Resolve SKILL_DIR to this skill's directory, not the document's project directory.
python3 -m pip install -r "$SKILL_DIR/scripts/requirements.txt"
python3 "$SKILL_DIR/scripts/mistral_ocr_extract.py" --help
python3 "$SKILL_DIR/scripts/mistral_ocr_extract.py" --input scan.pdf --pages 0-2 --out out/scan
MISTRAL_API_KEY comes from the environment/secret store. Do not print the key, signed URLs, raw request logs, or document contents unnecessarily. The script requires SDK v2 and imports Mistral from mistralai.client; there is no v1 fallback.