Skip to content
clusters: prooflayer · edgemarket · edgefinance · synthforge · mediakit · wordmint · webprobe · locale · comppoint · rollforge · bestiary · statline · matchpoint · retail · agentops · browserworkflow · modelrouter · compose
$ man html-to-pdf

/html-to-pdf

agentutility / mediakit / html-to-pdf
PRICE / CALL
$0.08
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
mediakit
CATEGORY
media
STATUS
live
NAME
html-to-pdf render a live webpage as a pdf document
SYNOPSIS
POST https://x402.agentutility.ai/html-to-pdf
     Content-Type: application/json
     X-PAYMENT:    <signed-transferWithAuthorization>

     { ... }
↳ first call → 402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.
DESCRIPTION

Render a live webpage as a PDF document. Send a url plus optional page_format, orientation, margins, and a wait_until condition for JS-heavy pages, and it captures the rendered page through CloudConvert and returns a pdf_url with the file size in bytes. Use it as a URL to PDF converter, webpage-to-PDF capture tool, or website screenshot to PDF generator for archiving or reporting pages.

INPUTrequest schema
propertytypedescriptionreq?
urlstringURL to render and capture as a PDF. Must be http or https.required
page_formatstringOptional. Page size, e.g. 'a4', 'letter', 'legal', 'tabloid', 'a0'-'a6'.optional
page_orientationstringOptional. 'portrait' or 'landscape'.
enum: portrait · landscape
optional
margin_topnumberOptional. Top margin in inches, 0-5.optional
margin_bottomnumberOptional. Bottom margin in inches, 0-5.optional
print_backgroundbooleanOptional. Include background graphics. Default false.optional
wait_untilstringOptional. Load condition before capture: 'load', 'domcontentloaded', 'networkidle0', or 'networkidle2'.optional
OUTPUTresponse shape
fieldtypedescription
pdf_urlstringSigned download URL for the rendered PDF file produced from the source webpage.
file_size_bytesnumberSize of the generated PDF in bytes.
source_urlstringOriginal webpage URL that was captured and converted to PDF.
job_idstringCloudConvert job identifier for the capture-website conversion task.
EXAMPLEStwo ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.agentutility.ai/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 the MCP package for this endpoint's cluster
npx -y @agentutility/mcp-<cluster>

# Required: EVM private key with USDC on Base
export X402_PRIVATE_KEY=0x...

# Then call the html-to-pdf tool from your MCP-aware agent.
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
ADJACENTother endpoints in mediakit
endpointdescriptionprice
subtitlesGenerate ready-to-use subtitle files from a video or audio URL.$0.08
doc-to-jsonConverts any document (PDF, DOCX, PPT, XLSX, or image) into structured JSON matching a caller-supplied schema.$0.10
extract-tablesDetects and extracts every table from a PDF document, returning structured JSON or CSV per table.$0.10
pdf-extract-tablesExtracts every table from a PDF, digital or scanned, and returns row-by-column text matrices page-by-page.$0.10
pdf-table-extractExtracts tables from digital or scanned PDFs, returning row/column matrices, CSV output, page numbers, and optional cell boxes.$0.10
pdf-table-extractorFinds tables in digital or scanned PDFs and returns row-by-column matrices, page numbers, and optional cell bounding boxes.$0.10
pdf-to-jpgConvert a PDF into page images for previews, thumbnails, or archiving.$0.10
speaker-diarizeTranscribe audio or video and label who said what.$0.10
SEE ALSO
agentutility · mediakit · x402 · mcp · llms.txt · registry.json · bazaar.x402.org