Documentation
Everything you need to integrate MeltDocs.
Introduction
MeltDocs converts and manipulates documents through a simple HTTP API. Send your files as multipart/form-data and get the result back — convert Office files, HTML, URLs and Markdown to PDF, capture screenshots, and merge or split PDFs, all behind one token.
The API base URL is https://api.meltdocs.com. Every route is a POST and returns a file.
Authentication
Authenticate every request with your API token as a Bearer token. Create a free account, open your dashboard, and copy your token (it starts with mdk_).
Authorization: Bearer mdk_live_…
This header is required on every route below. Keep your token secret and regenerate it from the dashboard if it leaks. Each successful conversion counts as one unit against your monthly quota.
Office documents → PDF
Convert Word, Excel, PowerPoint, OpenDocument and more to PDF. Send the document in the files field.
curl https://api.meltdocs.com/forms/libreoffice/convert \ -H "Authorization: Bearer mdk_live_…" \ -F files=@report.docx \ -o report.pdf
Common options (sent as form fields):
| Field | Effect |
|---|---|
landscape | Landscape orientation. |
nativePageRanges | Only export the given pages, e.g. 1-5. |
merge | Combine multiple uploaded files into a single PDF. |
pdfa | Produce an archival PDF/A (e.g. PDF/A-3b). |
metadata | JSON of metadata to embed (Title, Author, …). |
Send several files to convert a batch at once; they return as a ZIP unless you set merge=true to join them into one PDF.
HTML, URL & Markdown → PDF
Render web content into pixel-accurate PDFs.
From a URL
curl https://api.meltdocs.com/forms/chromium/convert/url \ -H "Authorization: Bearer mdk_live_…" \ -F url=https://example.com \ -o page.pdf
From an HTML file
curl https://api.meltdocs.com/forms/chromium/convert/html \ -H "Authorization: Bearer mdk_live_…" \ -F files=@index.html \ -o page.pdf
Markdown works the same way at /forms/chromium/convert/markdown. Layout options include paperWidth, paperHeight, marginTop/Bottom/Left/Right, landscape, printBackground, scale, and waitDelay (to let the page settle before capture).
PDF tools
Merge
curl https://api.meltdocs.com/forms/pdfengines/merge \ -H "Authorization: Bearer mdk_live_…" \ -F files=@a.pdf \ -F files=@b.pdf \ -o merged.pdf
Split
POST /forms/pdfengines/split — split a PDF by page intervals. Set splitMode (intervals or pages) and splitSpan (e.g. 2).
Convert to PDF/A
POST /forms/pdfengines/convert with pdfa (e.g. PDF/A-3b) or pdfua=true.
Screenshots
Capture a URL or HTML page as an image (PNG, JPEG or WebP) via /forms/chromium/screenshot/url, /html or /markdown.
curl https://api.meltdocs.com/forms/chromium/screenshot/url \ -H "Authorization: Bearer mdk_live_…" \ -F url=https://example.com \ -F format=png \ -o shot.png
Quotas & limits
Each plan includes a monthly conversion quota that resets on the first day of each month (UTC). Your dashboard shows usage against the quota in real time. When you reach the limit, requests return 402 Payment Required until the quota resets or you upgrade on the pricing page.
Errors
| Status | Meaning |
|---|---|
| 200 | Success; the body is the resulting file. |
| 400 | Bad request — missing file/field or unsupported input. |
| 401 | Missing or invalid API token. |
| 402 | Monthly quota exhausted — upgrade or wait for the reset. |
| 500 | Something went wrong on our side — retry shortly. |