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

Input

POST /api/markdown-to-pdf with JSON {markdown, title?, paper?: "A4"|"Letter"} (or a text/markdown body with ?title=&paper=)

ParameterWhereTypeDescription
markdown (required)JSON bodystringMarkdown source (CommonMark + GFM tables), max 200,000 characters
titleJSON bodystringOptional document title (printed on top, set in PDF metadata; defaults to the first H1)
paperJSON bodystring: A4 | LetterPage 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

Limits

Use it

All services