{"uid":"cap_8uiAIfVEGXI0qs3MOljsR","slug":"agentsvc-io-html-to-pdf-converter-a26f4f94","name":"agentsvc.io HTML to PDF Converter","description":"86 APIs for AI agents: web scraping and crawling to Markdown, AI summaries, data extraction and cited answers, screenshots and PDF, PDF, OCR and document conversion, news, paper and developer search and more, paid per call with USDC on Base, Solana, Polygon or Arbitrum via x402. No account, no API key, free sample on every service.","url":"https://agentsvc.io/api/v1/proxy/html-to-pdf?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":[],"properties":{}},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["success","data"],"properties":{"data":{"type":"object","required":["pdf_base64","page_count","file_size_bytes","generated_at"],"properties":{"page_count":{"type":"integer","description":"Number of pages in the generated PDF"},"pdf_base64":{"type":"string","description":"Base64-encoded PDF bytes (decode to get raw PDF file)"},"generated_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of generation"},"file_size_bytes":{"type":"integer","description":"Size of the PDF in bytes"}}},"success":{"type":"boolean"}}}}}}},"responseSchema":{"type":"json","example":{"data":{"page_count":2,"pdf_base64":"JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9...","generated_at":"2026-04-07T12:00:00.000Z","file_size_bytes":14867},"success":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0045","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0045/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0045","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0045","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_YxUBYtU3AJdW6AevIUog4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0045","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts HTML content to a PDF document, returning a base64-encoded PDF with page count and file size metadata","exampleAgentPrompt":"Convert this HTML string into a PDF for me: '<html><body><h1>Invoice #1042</h1><p>Total: $500</p></body></html>' — return it as a base64-encoded PDF.","exampleUseCases":[{"title":"Invoice PDF generation for billing","prompt":"Take this HTML invoice template I've filled in with the customer's order details and convert it to a PDF so I can email it as an attachment."},{"title":"Report export for data dashboards","prompt":"I've got an HTML report showing this week's sales stats — can you convert it to a PDF so it's ready to share with the team?"},{"title":"Legal document archiving from HTML","prompt":"Turn this HTML contract document into a PDF file — I need a base64-encoded version I can store and send to the client for signing."}],"resultDescription":"A JSON object containing: a base64-encoded string of the generated PDF (pdf_base64), the number of pages (page_count), the file size in bytes (file_size_bytes), and an ISO 8601 timestamp of when it was generated (generated_at). Decode the base64 string to get the raw PDF binary.","failureModes":["Malformed or invalid HTML may produce a blank or incorrectly rendered PDF","Very large HTML documents may time out or produce oversized output","Missing required 'input' fields (type, method, bodyType, body) will cause a schema validation error","Payment failure via x402/USDC on Base will prevent execution","Unsupported bodyType value (outside json/form-data/text) will be rejected"],"whenToPreferThis":"Choose this endpoint when you need a quick, no-account, pay-per-call HTML-to-PDF conversion without setting up dedicated PDF infrastructure. Ideal for AI agents that occasionally need to render HTML reports, invoices, or documents into portable PDF format using USDC micropayments on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T18:31:08.643Z","isFirstParty":false,"canonicalSlug":"agentsvc-io-html-to-pdf-converter-a26f4f94"}