$ man html-to-pdf
/html-to-pdf(1)
PRICE / CALL
$0.08
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
mediakitCATEGORY
media
STATUS
● live
NAME
html-to-pdf — url to pdf / html to pdf / webpage screenshot to pdf
SYNOPSIS
POST https://x402.org/v1/html-to-pdf
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
URL to PDF / HTML to PDF / webpage screenshot to PDF. CloudConvert capture-website. Configurable page size, orientation, margins, wait conditions. Renders JS.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| url | string | Public URL to render. | required |
| page_format | string | letter, legal, tabloid, ledger, a0-a6. | optional |
| page_orientation | string | 'portrait' (default) or 'landscape'. enum: portrait · landscape | optional |
| margin_top | number | Inches. 0-5. | optional |
| margin_bottom | number | Inches. 0-5. | optional |
| print_background | boolean | Print CSS backgrounds. Default true. | optional |
| wait_until | string | 'load' (default), 'domcontentloaded', 'networkidle0', 'networkidle2'. | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| pdf_url | string | Signed download URL for the rendered PDF file produced from the source webpage. |
| file_size_bytes | number | Size of the generated PDF in bytes. |
| source_url | string | Original webpage URL that was captured and converted to PDF. |
| job_id | string | CloudConvert job identifier for the capture-website conversion task. |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.org/v1/html-to-pdf \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# install once claude mcp add x402 --command "npx x402-deployer-mcp" # then ask Claude Code: # "use the html-to-pdf tool to ..."
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- htmlpdfurlscreenshotrendercapture
- env
- CLOUD_CONVERT_API_KEY
- methods
- POST
- cluster
- mediakit
- price
- $0.08 USDC per call
ADJACENT — other endpoints in mediakit
| endpoint | description | price |
|---|---|---|
| subtitles | SRT / VTT subtitle generator from video or audio. | $0.08 |
| extract-tables | Extract tables from PDF / table extractor / PDF to CSV / spreadsheet from PDF. | $0.10 |
| mp4-to-mp3 | MP4 → MP3 audio extractor. | $0.10 |
| pdf-extract-tables | PDF table extractor / table from PDF / scanned-table parsing / financial-table OCR / multi-page table consolidator / Datalab Marker tables. | $0.10 |
| pdf-to-jpg | PDF to JPG / PNG / WEBP image converter. | $0.10 |
| speaker-diarize | Speaker diarization / who-said-what transcription. | $0.10 |
| transcribe | Video / audio transcription via Whisper v3. | $0.10 |
| upscale-image | AI image upscaler / super-resolution / image enlarger. | $0.10 |
SEE ALSO