Convert PDF to Markdown with one API call

Turn a PDF into clean Markdown with a single curl or Python call to the mdkit REST API. No signup needed for small files.

Last updated

Sync upload cap 8 MB per file (POST /v1/convert)
Anonymous rate limit 30 requests/minute per IP; an API key raises it
Cost 1 credit per sync conversion

A PDF becomes Markdown with one POST /v1/convert call — upload the file as multipart form data and the response body carries the converted text. Anonymous calls work at a low per-IP rate limit, so you can try it before creating a key.

curl

curl -F "file=@report.pdf;type=application/pdf" https://api.mdkit.online/v1/convert

The response is JSON:

{"markdown": "# Quarterly report\n...", "meta": {"filename": "report.pdf"}}

Python

import httpx

with open("report.pdf", "rb") as fh:
    resp = httpx.post(
        "https://api.mdkit.online/v1/convert",
        files={"file": ("report.pdf", fh, "application/pdf")},
        headers={"X-API-Key": "YOUR_KEY"},  # optional — raises the rate limit
    )
resp.raise_for_status()
print(resp.json()["markdown"])

Files over 8 MB — or scanned, layout-heavy PDFs that deserve the high-fidelity engine — belong on the async lane: see the async jobs guide.

Try it

Try it free — or paste HTML straight into the free HTML→Markdown tool, no signup.

FAQ

How do I convert a PDF to Markdown without signing up?
POST the file to /v1/convert as multipart form data. Anonymous calls are allowed at 30 requests per minute per IP, so one curl command converts a PDF with no account and no key.
What is the maximum PDF size for a synchronous conversion?
8 MB. Larger files — and scanned or layout-heavy PDFs that deserve the high-fidelity engine — belong on the async lane at /v1/convert/jobs, which accepts up to 50 MB.
Does mdkit do OCR on scanned PDFs?
The high-fidelity async lane runs Docling, which handles far more difficult page layouts than the fast synchronous lane. For a scanned document, submit it as an async job rather than expecting the sync endpoint to cope.
How much does a PDF conversion cost?
Credits, not files: a synchronous conversion costs 1 credit and an async job costs 10. The free tier is 100 credits a month, Essential is €20/month for 10,000 and Scale is €80/month for 100,000.