mistral_ocr-0.1.1 is not a library.
Visit the last successful build:
mistral_ocr-0.2.0
Mistral OCR
A command-line tool to convert PDF, image, and document files into Markdown using Mistral AI's OCR API. Written in Rust.
Features
- Supports PDF, images (jpg, png, gif, bmp, tiff, webp), and office documents (docx, odt, pptx, xlsx, etc.)
- Office documents are automatically converted to PDF via LibreOffice
- Multiple image handling modes:
- separate — save images as files in a
_images/directory - inline — embed images as base64 data URIs (single self-contained
.mdfile) - zip — bundle markdown + images into a single
.ziparchive
- separate — save images as files in a
- Single static binary, no runtime dependencies
Installation
Prerequisites
- A Mistral API key
- LibreOffice (only needed for office document conversion)
Pre-built binary (recommended)
From source
Configuration
Set your Mistral API key as an environment variable:
Usage
Basic usage (text only)
Process an image
Process a Word document
Extract images as separate files
Single self-contained markdown file
Bundle everything into a zip
All options
<INPUT> Path to the input file (required)
--model <MODEL> Mistral OCR model name (default: mistral-ocr-latest)
--images <MODE> How to handle images: none, separate, inline, zip (default: none)
--output <PATH> Where to write the output (default: ocr_output.md)
Supported file types
| Type | Extensions |
|---|---|
| Images | jpg, jpeg, png, gif, bmp, tiff, webp |
| Documents (via LibreOffice) | doc, docx, odt, rtf, txt, html, pptx, ppt, odp, xlsx, xls, ods, csv, epub |
License
MIT — see LICENSE.