Convert HTML to PDF and return a public download link

Convert self-contained HTML with inline CSS into an A4 PDF and return a public download URL. Use for agent-generated reports, invoices, proposals and source lists. Costs 0.020 USDC per call; accepts up to 1 MiB of HTML and produces up to 20 pages / 10 MiB. Submit HTML, not a webpage URL; scripts and external resources are rejected. Uses seven-day deletion eligibility, not a hard public-access cutoff; asynchronous cleanup and caches may persist. Not renewable. Non-guessable public URL, not private: do not submit sensitive content. Direct HTTP x402, or the account-funded MCP tool render_pdf; no MPP route.

post/v1/render/pdf

Request

  • Base URL: https://api.munition.io
  • URL: https://api.munition.io/v1/render/pdf
  • Auth: none required

Request body

htmlstring required

Self-contained HTML document (UTF-8, up to 1 MiB) with inline CSS. No JavaScript, iframes, forms, <link>, external or relative resources: scripting is disabled and document requests are intercepted/aborted in an offline browser context, not process-wide OS egress isolation. The Chromium sandbox is disabled; process isolation is a deployment concern. Embed images and fonts as data: URIs (png, jpeg, gif, webp, svg, woff/woff2/ttf/otf). Output is A4, up to 20 pages / 10 MiB on successful return, with a 10-second application-level render watchdog budget. Launch, shutdown and cleanup can extend elapsed call time; this is not a hard process-lifetime bound. Page and PDF-byte limits are checked after PDF allocation and do not bound peak memory or CPU.

filenamestring

Optional filename used for a readable public URL slug, for example invoice-2026-09.pdf. Consecutive dots (..) anywhere are invalid.

Response

Public nonconfidential PDF, not renewable; seven-day deletion eligibility, not a hard public-access cutoff (asynchronous cleanup and caches may persist)

idstring required

Munition render id.

publicUrlstring uri required

Non-guessable public files.munition.io URL of the rendered PDF; do not render confidential content. PDF render artifacts are not renewable via direct x402 or MPP upload-renew endpoints, unlike ordinary uploads.

expiresAtstring date-time required

Seven-day deletion eligibility, not an exact public-access cutoff. Daily cleanup and asynchronous S3 lifecycle deletion may run later; cached responses can persist. No hard deletion deadline is guaranteed. PDF render artifacts are not renewable.

bytesinteger required

Size of the PDF in bytes.

pagesinteger required

Number of A4 pages in the PDF.

sha256string required

Lowercase hex SHA-256 of the PDF bytes.

renderMsinteger required

Server-side render time in milliseconds.

Changes

No recorded changes to this operation across all 1 revision of this API.