{"slug":"agentsvc-io-api-v1-proxy-html-to-pdf-8ecc92","title":"Render a URL or raw HTML string to PDF","host":"agentsvc.io","method":"POST","resource":"https://agentsvc.io/api/v1/proxy/html-to-pdf","category":"other","description":"Render a URL or raw HTML string to PDF. Returns pdf_base64 (base64 PDF; decode to get raw bytes) and page_count. Provide url OR html, never both. Supports format (A4/Letter/Legal), landscape boolean, and margin settings (top/bottom/left/right in CSS units). Use for invoices, reports, or printable do","price_listed":0.0045,"price_asked":0.0045,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":891,"reported_calls_30d":11,"reported_payers_30d":3,"networks":["eip155:137","eip155:42161","eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"html":"<h1>Invoice #123</h1><p>Total: $42.00</p>"},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{},"required":[]},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"properties":{"data":{"properties":{"file_size_bytes":{"description":"Size of the PDF in bytes","type":"integer"},"generated_at":{"description":"ISO 8601 timestamp of generation","format":"date-time","type":"string"},"page_count":{"description":"Number of pages in the generated PDF","type":"integer"},"pdf_base64":{"description":"Base64-encoded PDF bytes (decode to get raw PDF file)","type":"string"}},"required":["pdf_base64","page_count","file_size_bytes","generated_at"],"type":"object"},"success":{"type":"boolean"}},"required":["success","data"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-10-10","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.0045,"price_match":true,"latency_ms":891,"error":null}],"description_full":"Render a URL or raw HTML string to PDF. Returns pdf_base64 (base64 PDF; decode to get raw bytes) and page_count. Provide url OR html, never both. Supports format (A4/Letter/Legal), landscape boolean, and margin settings (top/bottom/left/right in CSS units). Use for invoices, reports, or printable document generation.","last_updated":"2026-10-10T09:01:58.513Z","schemes":["exact"]}