Developer API

Convert PDFs
from your code.

The droptomd API lets you convert PDF files to Markdown programmatically — same engine as the web app, accessible over HTTPS.

Get an API key

Keys are issued manually. Send us your use case and we'll get you set up.

Request a key →

Endpoint

POST https://droptomd.com/api/v1/convert

Headers

HeaderRequiredDescription
X-API-Key Yes Your API key
Content-Type Auto multipart/form-data (set automatically by most HTTP clients)

Request body

FieldTypeRequiredDescription
file File Yes PDF file to convert. Maximum size: 20 MB.

Response

FieldTypeDescription
markdown string Converted Markdown text
filename string Original filename
page_count integer Number of pages in the PDF
elapsed float Server-side conversion time in seconds

Examples

curl -X POST https://droptomd.com/api/v1/convert \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "file=@document.pdf"
import requests

with open("document.pdf", "rb") as f:
    response = requests.post(
        "https://droptomd.com/api/v1/convert",
        headers={"X-API-Key": "YOUR_API_KEY"},
        files={"file": ("document.pdf", f, "application/pdf")},
    )

data = response.json()
print(data["markdown"])
print(f"{data['page_count']} pages in {data['elapsed']}s")
const form = new FormData();
form.append("file", fileInput.files[0]);

const response = await fetch("https://droptomd.com/api/v1/convert", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY" },
  body: form,
});

const data = await response.json();
console.log(data.markdown);

Error codes

StatusMeaning
400 File is not a PDF
401 Missing X-API-Key header
403 Invalid API key
413 File exceeds 20 MB limit
500 Conversion failed (corrupted or unsupported PDF)

Error responses include a detail field: {"detail": "..."}

Limits

LimitValue
Max file size20 MB per request
Supported formatsPDF only (digital text; scanned PDFs not supported)
Rate limitNone currently — fair use expected