{"uid":"cap_ru40bx33PRAulm7OWKt8B","slug":"relaystation-html-to-image-7eaabc3a","name":"Relaystation HTML to Image","description":"$0.003/call. Render HTML to an image — sandboxed headless Chromium screenshot of your markup. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny","url":"https://api.relaystation.ai/v1/image/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":{"clip":{"type":"object","required":["x","y","width","height"],"properties":{"x":{"type":"number","maximum":100000,"minimum":0},"y":{"type":"number","maximum":100000,"minimum":0},"width":{"type":"number","maximum":100000,"minimum":1},"height":{"type":"number","maximum":100000,"minimum":1}},"description":"A region to capture (mutually exclusive with fullPage)."},"html":{"type":"string","minLength":1,"description":"Self-contained HTML; all assets inlined as data: URIs (no network)."},"type":{"enum":["png","jpeg","webp"],"type":"string"},"width":{"type":"integer","maximum":10000,"minimum":1,"description":"Viewport width."},"height":{"type":"integer","maximum":10000,"minimum":1,"description":"Viewport height."},"fullPage":{"type":"boolean","description":"Capture the full scrollable page (mutually exclusive with clip)."},"omitBackground":{"type":"boolean","description":"Transparent background (png/webp only)."}}},"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_zgvC3qU9hzfC43UEJcfg0","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 string to a PNG/image using a sandboxed headless Chromium instance and returns the screenshot","exampleAgentPrompt":"Can you render this HTML snippet as an image for me? Here's the markup: '<h1 style=\"color:navy\">Hello World</h1><p>This is a test paragraph.</p>'","exampleUseCases":[{"title":"Dynamic HTML email preview image","prompt":"Take this HTML email template and render it as a PNG image so I can embed a preview in our marketing dashboard: '<table style=\"font-family:Arial\"><tr><td><h2>Summer Sale!</h2><p>Get 30% off all items this weekend.</p></td></tr></table>'"},{"title":"HTML report card to shareable image","prompt":"Convert this HTML report snippet into an image I can share on social media: '<div style=\"padding:20px;background:#f0f0f0\"><h3>Q2 Results</h3><p>Revenue: $1.2M | Growth: 18%</p></div>'"},{"title":"Custom badge or label rendering","prompt":"Render this HTML badge as a PNG image for use in our README: '<span style=\"background:green;color:white;padding:4px 10px;border-radius:12px;font-size:14px\">✓ Passing</span>'"}],"resultDescription":"Returns a rendered image (PNG) of the provided HTML markup, captured via a sandboxed headless Chromium screenshot. The output is the image binary or a URL/base64 representation of the screenshot.","failureModes":["Invalid or malformed HTML may produce blank or broken images","External resource references (CDN fonts, remote images) may not load inside the sandbox","Overly large HTML or complex CSS may cause rendering timeouts","Missing or empty HTML body returns an error","Payment insufficient — x402 minimum is 1¢ USDC"],"whenToPreferThis":"Choose this endpoint when you need to convert raw HTML/CSS markup into a pixel-accurate image without managing a browser or Puppeteer instance yourself. Ideal for generating social preview cards, rendering email templates, producing shareable screenshots from dynamic HTML, or creating image assets from templated markup — all via a simple paid API call with no infrastructure overhead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:49:12.196Z","isFirstParty":false}