Introducing the Markdown Tidy API: programmatic clean, repair and convert
Markdown Tidy now has an API. One endpoint, one auth header, the same conversion engine that powers the web app — wired into your code. Available to all Premium customers with 2,000 credits a month included.
Why an API
The web app handles the everyday case — paste, clean, repair, export. But a lot of Markdown isn't actually generated by humans clicking buttons. It comes out of CI pipelines, scheduled reports, content workflows, AI agents, internal tools, customer-facing webhooks. Those want a programmatic interface, not a web editor. That's what the API is for.
One endpoint
We kept the surface area deliberately small. One endpoint, POST /v1/convert, does the whole job: clean the Markdown, repair broken structure, apply a design system, return the converted document. No batch endpoints, no streaming, no separate "render" and "export" steps. If you can write one HTTP request, you can use the API.
curl https://mdtidy.com/api/v1/convert \
-H "X-API-KEY: mt_live_…" \
-H "Content-Type: application/json" \
-d '{
"markdown": "# Report\n\n…",
"format": "pdf"
}'
The response gives you back the document (text for HTML, base64 for PDF/DOCX/PNG), how many credits the call used, how many you have left, and any warnings from the cleanup pass.
Credits, simply
Premium ($5/month) includes 2,000 credits a month. One credit equals one successful API call, regardless of document size (within the 200 KB-per-call limit). Failed calls don't consume credits. Unused credits don't roll over.
If 2,000 a month isn't enough, you can buy credit packs for $5 per 5,000 extra credits, one-time, non-expiring. Stack as many as you need. There's no metered billing and no surprise invoices.
Same engine, same quality
Everything the web app's Clean and Repair features do is available through the API. So is every design system (Minimal Clean, Executive Report, Developer Docs) and every export format (PDF, DOCX, HTML, PNG, plain text). The conversion goes through the same regression-tested pipeline that powers the browser side — output you can rely on, programmatically.
Use cases we've already heard about
- Nightly report generation. Pipe AI-summarised data through the API and email the PDF to the team. No manual copy-paste at 8am.
- Documentation pipelines. A CI job exports the latest internal docs to a clean PDF when the source repo changes.
- Customer-facing exports. A SaaS application offers "Download as PDF" by piping a Markdown report through the Markdown Tidy API. No need to maintain a renderer in-house.
- AI agents. Your agent generates a Markdown answer; the API turns it into a properly formatted document the user can actually share.
What you need to get started
- Be on Premium ($5 / month — sign up from the pricing page).
- Generate an API key from your account settings.
- Send your first request — the API documentation has full reference plus copy-paste curl, Node and Python examples.
What's next
We've intentionally shipped a small, stable surface. Likely next steps based on early feedback: webhook callbacks for long-running conversions, a batch endpoint for processing many documents at once, and language SDKs (Node, Python, Go). Let us know what you need — support@sudzy.co.
Related reading: Why ChatGPT Markdown breaks in Google Docs · DOCX vs PDF: which export format