Core
Markdown Render
Turn Markdown back into HTML or plain text with POST /v1/convert/markdown/{html,text}, at no credit cost.
Request
https://api.markitdown.ai/v1/convert/markdown/htmlRender Markdown to sanitized HTMLhttps://api.markitdown.ai/v1/convert/markdown/textRender Markdown to plain texttext | string | Markdown source, inline. |
file | multipart or string | A .md upload, or a file_… id referencing a stored markdown output. |
links | string | markdown/text only: text-url (default) appends the URL to the link text, text keeps the text alone. |
curl -X POST https://api.markitdown.ai/v1/convert/markdown/html \
-H "x-api-key: mdai_…" \
-H "Content-Type: application/json" \
-d '{ "text": "# Notes\n\nHello **world**." }'Responses
Render returns the same conversion envelope as a parse call — html and text are the value of files[0].outputs[0].content, inlined whenever the rendered document is at most 256 KB. There is no separate raw-body content negotiation any more: fetch a larger output, or automate a download, with GET .../files/{file_id}/content. usage.credits_charged is always 0.
Is rendering free?
Yes. HTML and plain-text rendering run synchronously and cost 0 credits; they still count toward your plan's per-minute rate limit. The HTML output is sanitized CommonMark with GitHub tables, task lists, and strikethrough, so it can be inserted into a page without executing scripts from the source Markdown.
Can it render PDF or DOCX?
Not on the server yet. There is no /v1/convert/markdown/pdf or /markdown/docx endpoint, so calling one returns 404 not_found. To make a PDF today, render HTML and print it, or use the browser Markdown to PDF tool on the website, which prints locally without uploading the document.
What does plain-text output look like?
Plain text keeps the reading order and drops the Markdown syntax. Headings become their own lines followed by a blank line, list items keep a marker and their indentation, tables become aligned columns, and fenced code keeps its content without the fences. Links keep their text followed by the URL in parentheses, so nothing is lost when the text is pasted into an email or a ticket; send links: "text" to drop the URLs. Use HTML output when the destination can display formatting, and plain text for search indexes, SMS, or prompts that should not see markup.
Sources and specs: RFC 9110: HTTP Semantics · RFC 7763: The text/markdown Media Type