POST v3/converter
POST api.mathpix.com/v3/converter
Convert an MMD (Mathpix Markdown) document to other formats. Returns a conversion_id for polling status and downloading results. Maximum JSON body size: 10 MB.
See the document conversion guide for step-by-step examples.
Request parameters
mmd MMD document that needs to be converted into other formats
formats Specifies output formats. See Conversion Formats.
conversion_options Specifies options for specific output formats. Each key corresponds to a format enabled in formats, and the associated object contains format-specific settings. See Conversion Options.
Response body
conversion_id Tracking ID for status and downloads
GET v3/converter/{conversion_id}
GET api.mathpix.com/v3/converter/{conversion_id}
Check conversion status.
status completed for an existing mmd document
conversion_status Status of each requested conversion format.
GET v3/converter/{conversion_id}.{ext}
GET api.mathpix.com/v3/converter/{conversion_id}.{ext}
Download results once the format's conversion status is completed.
| Extension | Description |
|---|---|
| mmd | Returns Mathpix Markdown text file |
| md | Returns plain Markdown text file |
| docx | Returns a docx file |
| html | Returns a HTML file with the rendered Mathpix Markdown content |
| latex.pdf | Returns a PDF file with LaTeX rendering |
| Returns a PDF file with HTML rendering | |
| pptx | Returns a pptx file |
| tex.zip | Returns a LaTeX zip file containing a .tex file and any images that appear in the document |
| mmd.zip | Returns a MMD zip file containing a Mathpix Markdown text file and any images that appear in the document |
| md.zip | Returns a MD zip file containing a Markdown text file and any images that appear in the document |
| html.zip | Returns a HTML zip file containing a HTML file and any images that appear in the document |
For ZIP formats, images will be referenced as follows:
tex.zip:\includegraphics[max width=\textwidth]{image-name}mmd.zipandmd.zip:html.zip:<img src="./images/image-name.jpg" alt="">
ConversionStatus object
A map from format name to its conversion state. Each key is a format name (e.g. docx, pdf) and the value is an object with the following fields:
status One of processing, completed, or error.
error_info Present when status is error. Contains id (error identifier) and error (human-readable message).
Example
{
"docx": {"status": "completed"},
"pdf": {"status": "error", "error_info": {"id": "conversion_error", "error": "..."}}
}
Conversion Formats
This parameter is called formats for v3/converter and conversion_formats for v3/pdf.
| Format | Description |
|---|---|
| md | Plain Markdown |
| docx | Microsoft Word document |
| tex.zip | LaTeX zip with images |
| html | HTML file |
| PDF with HTML rendering | |
| latex.pdf | PDF with LaTeX rendering |
| pptx | PowerPoint presentation |
| mmd.zip | Mathpix Markdown zip with images |
| md.zip | Markdown zip with images |
| html.zip | HTML zip with images |
Conversion Options
Conversion options used for v3/pdf conversion_options and v3/converter conversion_options.
Specifies options for specific output formats. Each key corresponds to a format enabled in formats, and the associated object contains format-specific settings.
Conversion options for docx
font Specifies the name of the font that will be used in the document.
fontSize Specifies the font size in half-points (e.g. 22 = 11pt).
language Specifies the document language for spelling and grammar checking. When auto, the language is detected automatically. See supported values below.
orientation Specifies the page orientation portrait or landscape.
margins Specifies page margins. All values are in twips (1 twip = 1/20 of a point).
| Field | Type | Default | Description |
|---|---|---|---|
| top | integer | 1440 | Top margin |
| right | integer | 1800 | Right margin |
| bottom | integer | 1440 | Bottom margin |
| left | integer | 1800 | Left margin |
| gutter | integer (optional) | 0 | Extra space for binding |
htmlTags Enables or disables support for HTML tags in the source content.
Supported language values:
auto, Afrikaans, Arabic, Basque (Basque), Bosnian, Bulgarian, Catalan, Chinese (China), Chinese (Taiwan), Croatian, Czech, Danish, Dutch, English (AUS), English (CAN), English (UK), English (US), Estonian, Finnish, French, French (Canada), French (Switzerland), Galician, Georgian,German, German (Austria), German (Switzerland), Greek, Gujarati, Hebrew, Hindi, Hungarian, Icelandic, Indonesian, Irish, isiXhosa, isiZulu, Italian, Japanese, Kannada, Kazakh, Kiswahili, Korean, Latvian, Lithuanian, Macedonian, Malaysian, Marathi, Norwegian Borkmal, Norwegian Nynorsk, Persian, Polish, Portuguese, Portuguese (Brazil), Romanian, Russian, Serbian (Cyrillic), Serbian (Latin), Sesotho Sa Leboa, Setswana, Slovak, Slovenian, Spanish, Spanish (Traditional Sort), Swedish, Tamil, Telugu, Thai, Turkish, Ukrainian, Welsh.
Conversion options for tex.zip
fontSize Specifies the font size as a LaTeX size string. Numeric values are treated as pt.
Values
10pt, 11pt, 12pt
font imagesFolder Specifies the folder name for images.
load_external_fonts Specifies that all used fonts should be included in the tex.zip. Used only for XeLaTeX1.
htmlTags Enables or disables support for HTML tags in the source content.
Note: The XeLaTeX compiler will be used if the document contains text in languages such as Bengali, Gujarati, Hindi, Hebrew, Tamil, Thai, Arabic, Japanese, Korean, Traditional Chinese, or Simplified Chinese.
Conversion options for html
htmlTags Enables or disables support for HTML tags in the source content.
Conversion options for md
math_inline_delimiters Specifies begin inline math and end inline math delimiters.
math_display_delimiters Specifies begin display math and end display math delimiters.
escape_ampersand Specifies whether to escape the & character in the source content.
escape_dollar Specifies whether to escape the $ character in the source content.
escape_hash Specifies whether to escape the # character in the source content.
escape_percent Specifies whether to escape the % character in the source content.
htmlTags Enables or disables support for HTML tags in the source content.
Conversion options for latex.pdf
fontSize Specifies the font size as a LaTeX size string. Numeric values are treated as pt.
Values
10pt, 11pt, 12pt
font htmlTags Enables or disables support for HTML tags in the source content.
Note: The XeLaTeX compiler will be used if the document contains text in languages such as Bengali, Gujarati, Hindi, Hebrew, Tamil, Thai, Arabic, Japanese, Korean, Traditional Chinese, or Simplified Chinese.
Conversion options for pdf
fontSize Specifies the font size in px. Clamped to the range 8–128.
text_color Specifies the text color, can be name, hex, or rgb.
background_color Specifies the background color, can be name, hex, or rgb.
disable_footer Enable or disable footer such as page numbers.
margin Specifies the margin size. Minimum value is 40, maximum is 200.
custom_css Specifies custom CSS styles to be applied to the document.
footnote_compact_refs Specifies the option to hide repeat indexes for Markdown footnotes.
resource_load_timeout_sec Specifies the timeout in seconds (can be fractional) for loading external resources (such as images or fonts). If a resource does not load within this time, it will be excluded from the output. Must be greater than zero.
htmlTags Enables or disables support for HTML tags in the source content.
Conversion options for pptx
fontSize Specifies the font size in px.
text_color Specifies the text color, can be name, hex, or rgb.
background_color Specifies the background color, can be name, hex, or rgb.
margin Specifies the margin size in px.
custom_css Specifies custom CSS styles to be applied to the document.
footnote_compact_refs Specifies the option to hide repeat indexes for Markdown footnotes.
htmlTags Enables or disables support for HTML tags in the source content.
Conversion options for md.zip
math_inline_delimiters Specifies begin inline math and end inline math delimiters.
math_display_delimiters Specifies begin display math and end display math delimiters.
escape_ampersand Specifies whether to escape the & character in the source content.
escape_dollar Specifies whether to escape the $ character in the source content.
escape_hash Specifies whether to escape the # character in the source content.
escape_percent Specifies whether to escape the % character in the source content.
htmlTags Enables or disables support for HTML tags in the source content.
Conversion options for html.zip
htmlTags Enables or disables support for HTML tags in the source content.