PDF to Markdown, through one API.
Use the same conversion service from your application or the batch workspace. Authenticate with a product API key.
Personal, Developer, Team and Enterprise include API, CLI, MCP and batch submissions. All channels share your plan’s page credits.
curl https://pdftomd.cc/api/v1/convert \
-H "Authorization: Bearer $PDFTOMD_API_KEY" \
-H "Idempotency-Key: example-conversion-0001" \
-F "file=@document.pdf;type=application/pdf" \
-F "keepImages=true"Use PDF to MD from your terminal or AI agent.
The CLI and MCP client use the same conversion API, job records and page credits as your account.
Personal, Developer, Team and Enterprise include API, CLI, MCP and batch submissions. All channels share your plan’s page credits.
Install the client
Requires Node.js 20+. Install the downloadable package, then set your service URL and product API key.
npm install --global https://pdftomd.cc/downloads/pdftomd-client-0.1.0.tgzDownload CLI + MCP package (.tgz)export PDFTOMD_BASE_URL="https://pdftomd.cc"
# Set PDFTOMD_API_KEY in your shell or secret manager.
pdftomd usage
pdftomd convert document.pdf \
--output document.md \
--idempotency-key document-request-0001
pdftomd batch first.pdf second.pdf \
--idempotency-key batch-request-000001Commands emit JSON for scripts. Errors and generated request IDs go to stderr. Output files are never overwritten. Use the same request ID and files after an interrupted upload.
| pdf_to_md_convert | Submit one PDF and return a job ID. |
| pdf_to_md_batch | Submit up to 10 PDFs with per-file receipts. |
| pdf_to_md_get_job | Read status and paginated Markdown, up to 20,000 characters per call. |
| pdf_to_md_get_batch | Query every file in a batch. |
| pdf_to_md_usage | Check credits, monthly usage and plan access. |
Endpoints
| POST | /api/v1/convert | Submit one PDF. Returns HTTP 202 with a job ID. |
| POST | /api/v1/batches | Submit up to 10 PDFs as repeated files fields. Returns per-file receipts. |
| GET | /api/v1/jobs/{id} | Read job status and the completed Markdown result. |
| GET | /api/v1/batches/{id} | Read per-file batch status. Download results through the jobs endpoint. |
| GET | /api/v1/usage | Read available credits and this UTC month’s conversion usage. |
Submit, poll, retrieve
Set your key in the PDFTOMD_API_KEY environment variable. Keep it on your server. After submission, poll the job or batch endpoint every 5 seconds until jobs are success or failed. Browser session cookies do not authenticate /api/v1 endpoints.
# Illustrative submission response, not a live conversion result
{
"code": 0,
"message": "ok",
"data": {
"id": "pdf_…",
"status": "pending",
"fileName": "document.pdf",
"pages": 12,
"quality": null
}
}
curl https://pdftomd.cc/api/v1/jobs/JOB_ID \
-H "Authorization: Bearer $PDFTOMD_API_KEY"A successful job returns result.markdown, result.pages, and result.images (name + base64 data). Failed jobs return an error code. Batch responses exclude result bodies; fetch each completed job separately. Outbound customer webhooks are not yet available.
Upload and request limits
PDF only. Maximum 10 MB and 200 pages per file; batch maximum 10 files and 25 MB total. Invalid batches are rejected before submission. Writes require at least 2 seconds between requests per account and endpoint. Reads require 0.5 seconds; HTTP 429 includes Retry-After.
Retry without duplicate charges
Send an Idempotency-Key of 16-80 letters, digits, underscores or hyphens. Reuse it with the same files, order and options when retrying a network interruption. A different payload returns HTTP 409. A batch can partially submit; resubmit the same batch to attempt missing files. Failed jobs require a new key.
Errors and billing
Responses use code, message and data; code 0 indicates success. HTTP 401: invalid key; 402: insufficient credits; 403: an active paid plan is required or API is disabled; 404: unknown job or batch; 409: idempotency conflict; 413: upload too large; 429: rate limit; 503: conversion engine not configured. Standard pages cost one credit each, reserved on submission and restored for failed jobs.
Parse quality
A provider quality score is a review signal, not a measured recognition accuracy. When the engine does not return a score, we show it as unavailable. The API returns quality: null when unavailable. A supplied score uses score, scale: 5, source: "provider" . Word-level confidence and review overlays are not included in this release.