{"uid":"cap_J_bl-oNpAERo_tN_dNFom","slug":"relaystation-html-to-pdf-f736edd9","name":"Relaystation HTML to PDF","description":"$0.003/call. Render HTML to PDF — sandboxed headless Chromium, print-quality output. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny","url":"https://api.relaystation.ai/v1/pdf/from-html","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":{"type":"object","properties":{"html":{"type":"string","minLength":1,"description":"The HTML to render; all assets inlined as data: URIs / inline <style>."},"options":{"type":"object","properties":{"scale":{"type":"number","maximum":2,"minimum":0.1},"format":{"enum":["A4","Letter","Legal","A3","A5","Tabloid","Ledger"],"type":"string"},"margin":{"type":"object","properties":{"top":{"type":"string","description":"CSS size, e.g. \"10mm\"."},"left":{"type":"string"},"right":{"type":"string"},"bottom":{"type":"string"}}},"tagged":{"type":"boolean","description":"Emit a tagged (accessible) PDF (default true)."},"landscape":{"type":"boolean"},"pageRanges":{"type":"string","maxLength":255,"description":"Page subset to print, e.g. \"1-5, 8\" (default: all pages)."},"footerTemplate":{"type":"string","maxLength":50000,"description":"HTML print footer; same classes/sandbox as headerTemplate."},"headerTemplate":{"type":"string","maxLength":50000,"description":"HTML print header; use the date/title/url/pageNumber/totalPages classes. Rendered under the data:-only sandbox."},"printBackground":{"type":"boolean"},"displayHeaderFooter":{"type":"boolean","description":"Render the header/footer templates (default false; auto-enabled when a template is supplied)."}}}}},"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"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_LNH9um0Ab1M2qsmT_uSeK","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Renders an HTML document to a print-quality PDF using sandboxed headless Chromium","exampleAgentPrompt":"Take this HTML invoice markup I have and render it into a clean, print-quality PDF — use sandboxed headless Chromium so the CSS and layout come out exactly right.","exampleUseCases":[{"title":"Invoice PDF generation for billing","prompt":"I have an HTML invoice template with our company branding and line items — can you render it into a PDF I can attach to the customer email?"},{"title":"Report export from HTML dashboard","prompt":"Convert this HTML report page, including all the tables and charts styled with CSS, into a downloadable PDF for the client presentation."},{"title":"PDF snapshot of HTML email template","prompt":"Take this HTML email template and turn it into a PDF so I can share a preview with the design team for sign-off before we send it."}],"resultDescription":"A binary PDF file rendered from the provided HTML input using headless Chromium, with print-quality layout and full CSS support. The response contains the PDF bytes ready for storage, download, or forwarding.","failureModes":["Malformed or incomplete HTML may produce garbled or blank PDF output","External resources (images, fonts, stylesheets) referenced by URLs may fail to load in the sandboxed environment","Very large or complex HTML documents may time out or exceed memory limits","Missing or unsupported CSS features may cause layout differences from browser rendering","Network-dependent assets may not render if sandboxing blocks outbound requests"],"whenToPreferThis":"Choose this endpoint when you need to programmatically convert HTML markup — including full CSS styling — into a print-quality PDF, especially for invoices, reports, or templates. It is preferable over generic PDF libraries when CSS fidelity and Chromium-accurate rendering are important. Use it when you already have HTML content and need a reliable, per-call, pay-as-you-go PDF generation service without managing your own headless browser infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:55:31.104Z","isFirstParty":false}