Snip Snipping Tool Chrome Extension OCR API Files API Private Cloud OCR Secure Conversion Service
Make Documents Accessible Process Chemical Documents Collaborate on Documents OCR API for Developers Train Language Models Support Academic Research Artificial Intelligence Fintech Edtech Pharma & Chemical Universities & Schools
Handwriting Recognition Digital Ink On-prem PDF Cloud Mathpix Markdown All Supported Languages Image Conversion PDF Conversion Markdown Conversion Table OCR Mathpix CLI PDF Search PDF Reader PDF Data Extraction Chrome Extension View Conversion Gallery
Snip APIs Private Cloud OCR SCS
Mobile Desktop Web Chrome Extension
Mathpix Snip Apps Mathpix OCR API Mathpix Markdown Python SDK
Blog
About Careers Contact
Contact Get Started

Configuration

mpx reads credentials and settings from two INI files with named profiles.
Credentials (your app_id and app_key) live in ~/.mpx/credentials; other settings (endpoint,
default output) live in ~/.mpx/config. Override the directory with MPX_CONFIG_DIR.

Interactive setup

mpx configure
prompts for each value and writes both files. The credentials file is written 0600 so your keys are
not world-readable, and secrets never go in the config file. Configure another profile with
--profile:
mpx configure --profile work

Precedence

For every setting, the first value found wins: flag, then environment variable, then the profile
file.
setting flag environment file
app_id --app-id MATHPIX_APP_ID credentials
app_key --app-key MATHPIX_APP_KEY credentials
endpoint --endpoint MPX_ENDPOINT config
output --output MPX_OUTPUT config
verbosity --verbosity MPX_VERBOSITY config
profile --profile MPX_PROFILE

Progress and verbosity

A convert that submits a document and polls for the result shows a live progress indicator on the
terminal: an animated spinner with a percent bar and page count as the pages are recognized. It is
drawn only on a terminal, so redirected output and log files stay clean.
The verbosity setting controls it, with two values:
  • normal (the default) shows the progress indicator.
  • quiet hides it.
Set it per command with --quiet (shorthand for --verbosity quiet) or --verbosity quiet, for the
session with MPX_VERBOSITY=quiet, or permanently in a profile with mpx configure (or
verbosity = quiet in ~/.mpx/config):
mpx --quiet scs convert paper.pdf paper.mmd

Endpoint

The endpoint defaults to https://api.mathpix.com. Point it at the EU region for data residency, or
at a private deployment:
mpx --endpoint https://eu.api.mathpix.com scs convert paper.pdf paper.mmd

Profiles

Select a profile per command with --profile NAME (or set MPX_PROFILE). Each profile is an
independent set of credentials and settings, so one machine can hold several identities:
mpx --profile work scs convert paper.pdf paper.mmd