Skip to main content

Mistral OCR PDF

CLI tool to convert PDFs to markdown using Mistral OCR.

Installation

pip install mistral-ocr-pdf
# or with uv
uv pip install mistral-ocr-pdf

Usage

Convert a PDF to markdown:

mistral-ocr-pdf input.pdf
# Output will be saved as input.md

Specify output file:

mistral-ocr-pdf -o output.md input.pdf

Save raw OCR response JSON for debugging:

mistral-ocr-pdf --output-json response.json input.pdf

API Key Configuration

The Mistral API key can be configured in three ways:

  1. Environment variable:

    export MISTRAL_API_KEY="sk-xxxx"
    mistral-ocr-pdf input.pdf
    
  2. Config file:

    mistral-ocr-pdf -sk api_key -sv "sk-xxxx"
    # This saves the key to ~/.config/mistral_ocr_pdf/config.json
    
  3. Direct config file editing: Create or edit ~/.config/mistral_ocr_pdf/config.json with:

    {
      "api_key": "sk-xxxx"
    }
    

Run with uv

You can also run the tool directly with uvx:

uvx mistral-ocr-pdf input.pdf

Metadata

Release files for mistral-ocr-pdf 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mistral-ocr-pdf 0.1.0
File Size Uploaded Provenance
mistral_ocr_pdf-0.1.0.tar.gz 4.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mistral-ocr-pdf 0.1.0
File Interpreter ABI Platform
mistral_ocr_pdf-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / mistral_ocr_pdf-0.1.0.tar.gz

Download URL mistral_ocr_pdf-0.1.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0c233c5e594d31dfeca04191d2f41ed94e48b9c069c59cf116d0d622d7ada47e
BLAKE2b-256 checksum
How to use checksums
4a1f5ce85c79acfec35ef2a500f5cd3aba105bb25f1da971443680bba1ebdf76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Release files / mistral_ocr_pdf-0.1.0-py3-none-any.whl

Download URL mistral_ocr_pdf-0.1.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9caf329be2b6170b75c52760b33b7ad2fb40bee701798f3319c05fb59b7ba5b9
BLAKE2b-256 checksum
How to use checksums
d1ec51b06fa23c35829a007f89d84da992edbe5055074cd685ebb561421d284f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Security for mistral-ocr-pdf 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page