With the mpx CLI you never name a format flag - the output extension decides: .mmd, .docx, .tex, .html, or .pdf. Hand it an .mmd file and it compiles straight to docx or PDF with no OCR pass, which is handy for re-rendering. Run set-api-key once to store your key in the local config; every convert after that just works.

Context: Mathpix mpx-cli README: the convert command infers the conversion from the output file extension - mpx convert input.pdf output.mmd, .docx, .tex, or .html. It also compiles Mathpix Markdown without OCR (input.mmd to output.docx) and can serve a directory of mmd files as rendered HTML. API key is stored via set-api-key in the user config file.