VisualActive

HTML to PDF

Convert any URL or HTML string to a downloadable PDF. Perfect for generating reports, invoices, and documents.

Endpointx402 Payment Required

POST

https://agentsvc.io/api/v1/services/html-to-pdf/call

Price

$0.008 USDC

Latency P99

~3.5s

Provider

agentsvc.io

Input Schema

{ "type": "object", "oneOf": [ { "required": [ "url" ], "properties": { "url": { "type": "string", "format": "uri" } } }, { "required": [ "html" ], "properties": { "html": { "type": "string" } } } ], "properties": { "url": { "type": "string", "format": "uri", "description": "URL to render as PDF" }, "html": { "type": "string", "description": "Raw HTML string to render" }, "format": { "type": "string", "enum": [ "A4", "Letter", "Legal" ], "default": "A4" }, "landscape": { "type": "boolean", "default": false }, "margin": { "type": "object", "properties": { "top": { "type": "string" }, "bottom": { "type": "string" }, "left": { "type": "string" }, "right": { "type": "string" } } } } }

Output Schema

{ "type": "object", "properties": { "pdf_base64": { "type": "string", "description": "Base64-encoded PDF bytes" }, "page_count": { "type": "integer" }, "file_size_bytes": { "type": "integer" }, "generated_at": { "type": "string", "format": "date-time" } } }

Code Examples

curl -X POST "https://agentsvc.io/api/v1/services/html-to-pdf/call" \
  -H "Content-Type: application/json" \
  -H "X-Payment: x402 usdc base <your-signed-payment>" \
  -d '{
  "url": "https://example.com"
}'

Tags

#pdf#browser#document#playwright#convert

Service Info

Service IDsvc_htmlpdf_04
Categoryvisual
StatusActive
ChainBase (USDC)
Protocolx402
Read API Documentation →