Document conversion as an API
The engine behind mdedit.ai's converters, callable from code, terminal, and agents. Tables, math, and Mermaid survive the trip.
By Vivek Maskara · Last updated
npx mdedit-cli convert README.md --to docx
npx mdedit-cli convert thesis.tex --to pdf
One engine, three ways in
The same conversion service answers your backend, your shell scripts, and your AI agents. One key, one quota, identical output everywhere.
REST
Async jobs over plain HTTP: upload, convert, poll, download. Typed schemas in the OpenAPI reference.
POST https://apiv2.mdedit.ai/api/conversionsCLI
One command in a script or CI step. Formats are inferred from file extensions.
mdedit convert notes.md --to pdf --out notes.pdfAgents
The convert_document tool ships in the mdedit MCP server, listed for Claude, Cursor, and Gemini.
claude mcp add --transport stdio mdedit -- npx -y @mdedit/mcp-serverYour first conversion in three requests
Conversion runs as an async job: upload the input, start the job, poll for the download. Full request and response schemas live in the interactive reference.
KEY="tools/input/$(uuidgen | tr '[:upper:]' '[:lower:]')/README.md" SIGNED_URL=$(curl -s -X POST https://apiv2.mdedit.ai/api/conversions/uploads \ -H "x-api-key: $MDEDIT_API_KEY" -H "Content-Type: application/json" \ -d "{\"key\": \"$KEY\", \"action\": \"putObject\", \"contentType\": \"text/markdown\"}" | jq -r .signedUrl)
curl -X PUT "$SIGNED_URL" -H "Content-Type: text/markdown" --data-binary @README.md JOB_ID=$(curl -s -X POST https://apiv2.mdedit.ai/api/conversions \ -H "x-api-key: $MDEDIT_API_KEY" -H "Content-Type: application/json" \ -d "{\"type\": \"pandoc\", \"inputKey\": \"$KEY\", \"inputFormat\": \"markdown\", \"outputFormat\": \"docx\"}" | jq -r .jobId)
curl -s https://apiv2.mdedit.ai/api/conversions/$JOB_ID -H "x-api-key: $MDEDIT_API_KEY" | jq .status curl -OJ https://apiv2.mdedit.ai/api/conversions/$JOB_ID/download -H "x-api-key: $MDEDIT_API_KEY"
Published quotas, no surprises
API conversions are metered per account each calendar month, with a per-credential daily burst cap. Standard is the plan built for developers.
| Plan | Conversions / month | Burst / day | Built for |
|---|---|---|---|
| Free | 25 | 10 | Enough to wire up and test an integration. |
| Standard | 2,500 | 250 | The developer plan. Covers scripts, CI jobs, and steady production use. |
| Premium | 5,000 | 500 | Headroom for pipelines that convert at volume. |
Keys can be scoped: choose Conversions only when creating one and it carries conversions:execute and nothing else. Plan pricing is on the pricing page.
Conversions API questions
How do I authenticate?
Create an API key in Settings with the conversions:execute scope and send it as an x-api-key header. The CLI and MCP server accept the same key, and all three channels draw from the same quota. See API keys.
Which formats are supported?
Markdown, HTML, and LaTeX inputs convert to Word, PDF, HTML, LaTeX, EPUB, and more through the Pandoc engine. Office documents and PDFs convert to Markdown through MarkItDown. Markdown and HTML also render to PDF directly, and Markdown bundles export as Zip with assets.
Is there a free tier?
Yes. Every account gets 25 API conversions a month with a 10-per-day burst allowance, enough to build and test an integration before paying anything.
What happens when I hit the quota?
The request returns 403 with the meter state and reset time in the body, and nothing is charged against the quota. Monthly meters reset on the calendar month; burst meters reset daily. Current usage is shown in Settings.
I need more than the Premium ceiling. What are my options?
Higher-volume access is provisioned case by case while the API is in its first release. Contact us with your expected monthly volume.