MD2PDF REST API

Create, update, and share Markdown documents programmatically.

The public API lets AI agents, scripts, and integrations produce styled, shareable documents in Markdown — no signup, no API key. Rate-limited to 10 saves per IP per minute.

Try in Browser AI Skill llms-full.txt

Endpoints

POST /api/save

Save a Markdown document. Returns a short URL and an edit key.

curl -X POST https://md2pdf.studio/api/save \
  -H "Content-Type: text/plain" \
  --data-binary "# Hello\n\nThis is a shared document."

Response:

{
  "id": "aB3xY9zK",
  "editKey": "…",
  "url": "https://md2pdf.studio/s/aB3xY9zK",
  "key": "…"   // AES-256-GCM key (server-encrypted docs)
}

PUT /api/update/:id

Update a previously-saved document. Requires the X-Edit-Key header.

curl -X PUT https://md2pdf.studio/api/update/aB3xY9zK \
  -H "Content-Type: text/plain" \
  -H "X-Edit-Key: YOUR_EDIT_KEY" \
  -H "X-Enc-Key: YOUR_ENC_KEY" \
  --data-binary "# Hello (updated)"

GET /s/:id

Load a shared document. HTML response includes dynamic Open Graph tags so link previews show the document's title and description on Slack, WhatsApp, Teams, and Discord.

Rate Limits

Saves per IP
10 / minute
Max document size
500 KB
Retention
90 days from last update
Auth
None (anonymous)

Encryption

All documents are encrypted at rest (AES-256-GCM). When you save via the API without client-side encryption, MD2PDF encrypts the document server-side and returns the key in the response. Keep the key to decrypt or re-update the document later.

For AI Agents

See /ai-skill for the installable Claude Skill, /llms-full.txt for the full LLM documentation, and /skill.md for the skill manifest.

FAQ

Do I need an API key?

No. The API is anonymous and rate-limited by IP. For higher limits, self-host via the open-source repo.

Is there an OpenAPI / Swagger spec?

Not yet. See llms-full.txt for a complete machine-readable description.

Can I delete a document?

Not currently. Documents expire automatically 90 days after their last update.