# x402-tools HTML to PDF Renderer

> x402-tools HTML to PDF Renderer is a paid API for AI agents from x402.nichospt.net, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-11).

Renders an HTML document into a PDF file, with configurable page format, margins, and orientation, billed per-call in USDC via x402

## Facts

- Endpoint: POST https://x402.nichospt.net/render?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-tools-html-to-pdf-renderer-fde6943c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-o7_54FNxZhVF2vWFufd4

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 x402-tools-html-to-pdf-renderer-fde6943c -d '<json body>'
```

Example prompt: Take this HTML invoice I've drafted and render it as a PDF in A4 portrait format with 20px margins on all sides: <html>...</html>

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call HTML-to-PDF conversion without setting up your own headless browser infrastructure. Ideal for agents generating invoices, reports, or documents from HTML templates on demand, billed fractionally in USDC.

## Known failure modes

- HTML content exceeds 2,000,000 character limit — request rejected
- Invalid format enum value (must be 'A4' or 'Letter') — validation error
- Malformed HTML causing render failure — may return empty or broken PDF
- Payment not settled via x402 — 402 Payment Required response
- Network timeout for very large or complex HTML documents

## How this service works

Pay-per-call utility APIs for AI agents, settled in USDC via the x402 protocol.

## Output

A binary PDF file (application/pdf) representing the rendered HTML document, ready to save or send

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "html": {
   "type": "string",
   "maxLength": 2000000,
   "description": "HTML document to render"
  },
  "options": {
   "type": "object",
   "properties": {
    "format": {
     "enum": [
      "A4",
      "Letter"
     ],
     "type": "string",
     "default": "A4"
    },
    "margin": {
     "description": "CSS-length string or { top, bottom, left, right }"
    },
    "landscape": {
     "type": "boolean",
     "default": false
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": "<binary application/pdf>"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-tools-html-to-pdf-renderer-fde6943c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.nichospt.net](https://www.zero.xyz/host/x402.nichospt.net/llms.txt)
