Convert HTML to pixel-perfect PDF documents. Send raw HTML and get back a rendered PDF. Great for invoices, reports, and printable content.
Base URL:
https://pylon-html-to-pdf-api.fly.dev
| Parameter | Type | Required | Description |
|---|---|---|---|
html | string (JSON body) | Yes | HTML content to convert |
Returns a PDF document (200 OK with Content-Type: application/pdf).
| Status | Description |
|---|---|
200 | PDF document returned |
402 | Payment required — x402 challenge returned |
400 | Missing or invalid HTML |
500 | Conversion failed |
$0.01 USDC per request — paid via x402 on Base Sepolia. No API key. No subscription. Pay per call.
curl -X POST "https://pylon-html-to-pdf-api.fly.dev/convert" \
-H "Content-Type: application/json" \
-d '{"html": "<h1>Hello</h1><p>World</p>"}' \
--output output.pdf
To use Pylon APIs, you need an x402-compatible client with a funded wallet on Base Sepolia. Here's the quick setup:
The x402 flow: your first request returns 402 Payment Required with payment details in headers. The x402 client signs a USDC payment, then retries with payment proof attached. All automatic, all in milliseconds.