Markdown to Styled PDF Generator API - A4/Letter
markdown_to_pdf_apiConvert GitHub-Flavored Markdown (headings, tables, fenced code blocks, lists) into clean printable A4 or Letter PDF documents with configurable page margins. Offline sandboxed rendering (no external network requests), deterministic output, nothing stored. Built for AI agent report generation, technical docs, and SaaS export pipelines. Free: 5 calls/day per IP. Paid: Radar API key (from €15/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.01/call via x402 at https://radarbg.com/x402/markdown-to-pdf-api.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"fileName": "q4-summary.pdf",
"marginMm": 18,
"markdown": "# Q4 Operations Summary\n\nAll automated pipelines passed **99.9%** SLA targets.\n\n| Region | Invoices | Value (EUR) |\n|---|---|---|\n| DACH | 1,420 | 384,500 |\n| Benelux | 615 | 149,200 |\n\n```json\n{\"status\": \"ok\", \"errors\": 0}\n```\n",
"pageSize": "A4"
},
"name": "markdown_to_pdf_api"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Optional document title metadata. | |
| fileName | No | Optional output file name (e.g. quarterly-report.pdf). | |
| marginMm | No | Page margin in millimeters (5-40). | |
| markdown | No | GitHub-Flavored Markdown text (provide either markdown or fileBase64, max 2 MB). | |
| pageSize | No | PDF page size: A4 or Letter. | A4 |
| fileBase64 | No | Base64-encoded .md file (alternative to markdown). |