Document to Markdown REST API & SDK Generator
Public v1 Resource: POST /api/v1/conversions (Multipart Form-Data · Max 10 MB · Keyless REST API)
Stateless in-memory API — uploaded files are discarded immediately after conversion
Open Swagger UI (/swagger)
Dedicated Binary Document & Spreadsheet Converters
RESTful v1 Resources & Response Specification
ToMarkdown serves three OpenAPI 3.0.3 resources (/openapi.json):
POST /api/v1/conversions (createConversion), GET /api/v1/formats (listFormats), and GET /api/v1/health (getHealth).
HTTP/1.1 200 OK
Content-Type: application/json
X-RateLimit-Limit: 15
X-RateLimit-Remaining: 14
{
"filename": "architecture-spec.pdf",
"media_type": "application/pdf",
"size_bytes": 248910,
"token_count": 1842,
"markdown": "# Architecture Specification\n\nConverted Markdown content..."
}
- Content Negotiation: Pass
Accept: application/json(?format=json) for theConversionobject, orAccept: text/markdown(?format=markdown) for a direct.mddownload stream. - Quotas & Errors: Supports 22 document/spreadsheet/markup extensions up to 10 MB (
15 req/minper IP); returns structured{ "error": { "code", "message", "status" } }on400,413,415(images/SVGs), and429.
Frequently Asked Questions
Does POST /api/v1/conversions require an API key?
No. Public document conversions (.pdf, .docx, .xlsx, .ods, .numbers, .html, .xml, .csv) up to 10 MB are free and require no API key. Image and SVG files are rejected (415) and per-IP rate limiting (15 req/min) protects service availability.
What JSON schema does POST /api/v1/conversions return?
When Accept: application/json or ?format=json is specified, POST /api/v1/conversions returns { filename, media_type, size_bytes, token_count, markdown } where markdown contains the extracted GFM and token_count reports the estimated token count.