# Munition HTML to PDF Renderer

> Munition HTML to PDF Renderer is a paid API for AI agents from api.munition.io, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-16).

Converts a self-contained HTML document into an A4 PDF file and returns a temporary public download URL, billed at 0.020 USDC via x402.

## Facts

- Endpoint: POST https://api.munition.io/v1/render/pdf
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/munition-html-to-pdf-renderer-d71b5b2d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Iy9taSIKAMagBo4FaSGE9

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability munition-html-to-pdf-renderer-d71b5b2d -d '<json body>'
```

Example prompt: Take this self-contained HTML invoice document and render it as an A4 PDF — save it as invoice-2026-09.pdf and give me the public download link.

## When to prefer this

Choose this endpoint when you need a synchronous, pay-per-use HTML-to-A4-PDF conversion with a hosted download URL and no subscription. It is well-suited for AI agents generating invoices, reports, or contracts from pre-rendered, self-contained HTML with inlined CSS and data-URI assets. Prefer it over general-purpose PDF libraries when you need a hosted public URL returned automatically. Avoid it for documents requiring JavaScript execution, external resource loading, forms, iframes, or content that must remain private beyond the seven-day window.

## Known failure modes

- HTML exceeds 1 MiB limit — request rejected
- Rendered PDF exceeds 20 pages or 10 MiB — post-render rejection
- Render watchdog timeout (10-second budget) exceeded — timeout error
- External resources (scripts, iframes, external CSS/images) blocked silently — output may be visually incomplete
- Consecutive dots (..) in filename — validation error
- Insufficient USDC balance or x402 payment failure — payment error
- Service deployment unverified — endpoint may be unavailable

## How this service works

Synchronous HTML to A4 PDF, 0.020 USDC with 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. HTTP x402 only; no PDF MCP tool or MPP route. Candidate implementation; deployment not verified.

## Output

A JSON object containing: a unique PDF id, file size in bytes, page count, SHA-256 hash of the PDF, render time in milliseconds, an expiry timestamp (approximately seven days out), and a non-guessable public URL at files.munition.io where the PDF can be downloaded. The file is not renewed automatically and is deleted after the expiry window.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "html": {
   "type": "string",
   "maxLength": 1048576,
   "minLength": 1,
   "description": "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."
  },
  "filename": {
   "type": "string",
   "maxLength": 180,
   "minLength": 1,
   "description": "Optional filename used for a readable public URL slug, for example invoice-2026-09.pdf. Consecutive dots (..) anywhere are invalid."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "pdf_example",
  "bytes": 1000,
  "pages": 1,
  "sha256": "0000000000000000000000000000000000000000000000000000000000000000",
  "renderMs": 100,
  "expiresAt": "2026-09-15T00:00:00.000Z",
  "publicUrl": "https://files.munition.io/render/pdf_example-report.pdf"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/munition-html-to-pdf-renderer-d71b5b2d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.munition.io](https://www.zero.xyz/host/api.munition.io/llms.txt)
