API documentation

Convert markdown to HTML, plain text, PDF, DOCX, and PNG from your own scripts. Authenticate with a single header — no SDK required.

Machine-readable spec
The full OpenAPI 3.1 document lives at the URL below. Drop it into Swagger UI, Redoc, or your favorite codegen tool.
Quickstart
Create an API key on the API & Agentic page, then call the convert endpoint. Every request is metered against your credit wallet — see /api/v1/usage for the current balance.

Convert markdown

curl -X POST https://markdowntidy.com/api/v1/convert \
  -H "X-API-KEY: $MARKDOWN_TIDY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "# Hello\n\nWorld.",
    "format": "html"
  }'

The response body is JSON: inline HTML/text or a base64-encoded binary (PDF/DOCX/PNG). Every response includes creditsCharged and creditsRemaining.

Check your usage

curl https://markdowntidy.com/api/v1/usage \
  -H "X-API-KEY: $MARKDOWN_TIDY_KEY"

Returns your current credit balance plus the last 25 calls. Authenticate with either an API key or a logged-in browser session.

Error format
All errors share the same envelope. The requestId is also returned as the X-Request-ID header — quote it when you contact support.
{
  "error": {
    "code": "invalid_request",
    "message": "format: required",
    "requestId": "f0c7…"
  }
}