Resolve402 / services
Markdown to PDF
POST /api/markdown-to-pdf · $0.01 per call (USDC on Base or Solana, x402)
Render Markdown into a clean PDF (headings, paragraphs, bold/italic/links, nested lists, code blocks, blockquotes, simple tables, page numbers, PDF bookmarks from H1-H3, internal #anchor links, embedded Unicode font: Latin, Greek, Cyrillic, €). POST JSON { markdown, title?, paper?: "A4" | "Letter" } (max 200k characters), get application/pdf back. For hosted agents that must deliver a report, a memo or an invoice as a file. Nothing stored.
Problem solved
Your agent must deliver a report, a memo or an invoice as a PDF file and only has Markdown.
Use cases
- Turn a generated weekly report into a PDF to attach to an email.
- Round trip: doc to Markdown, edit the Markdown, then back to PDF.
Input
POST /api/markdown-to-pdf with JSON {markdown, title?, paper?: "A4"|"Letter"} (or a text/markdown body with ?title=&paper=)
| Parameter | Where | Type | Description |
|---|---|---|---|
markdown (required) | JSON body | string | Markdown source (CommonMark + GFM tables), max 200,000 characters |
title | JSON body | string | Optional document title (printed on top, set in PDF metadata; defaults to the first H1) |
paper | JSON body | string: A4 | Letter | Page size, default A4 |
Output
application/pdf: headings, paragraphs, bold/italic/links, nested lists, code blocks, blockquotes, simple tables, page numbers, PDF bookmarks from H1-H3, internal #anchor links, embedded Unicode font (Latin, Greek, Cyrillic, €). Max 200,000 characters of Markdown.
Price
$0.01 per call. Charged when the PDF is returned: empty or invalid Markdown (400) and oversized input (413) are not charged.
Example
POST https://resolve402.dev/api/markdown-to-pdf
content-type: application/json
{
"markdown": "# Weekly report\n\nRevenue grew **12%**.\n\n| Region | Revenue |\n|---|---|\n| EU | 1.2M |",
"title": "Weekly report",
"paper": "A4"
}{
"content-type": "application/pdf",
"body": "%PDF-1.5 … (binary)"
}Bazaar discovery example served in the production 402.
Sources
- Your Markdown only; rendered in memory on our server with embedded Liberation fonts
Limits
- Max 200,000 characters of Markdown.
- Simple GFM tables only. Images are not embedded: they appear as an [image: alt] placeholder.
- Nothing stored: the PDF is built in memory and streamed back.
Use it
- HTTP + x402: call the URL, pay the 402 with any x402 v2 client, retry with the PAYMENT-SIGNATURE header.
- OpenAPI: /openapi.json (operation
markdownToPdf) - MCP:
npx -y resolve402-mcp, toolmarkdown_to_pdf(npm) - Agent guide: /llms.txt · skill: /SKILL.md