Turn any HTML string into a pixel-perfect PNG, JPEG, or WebP โ OG cards, email previews, reports, charts.
Any HTML you can write, we can render to a pixel-perfect image.
Generate dynamic Open Graph social share images at 1200ร630. Inject titles, descriptions, and branding โ one render per page, automated.
Render HTML email templates to PNG before sending. Catch layout bugs without spinning up a real email client.
Render charts, tables, and KPI dashboards as images for reports, Slack digests, or PDF attachments.
Generate custom, branded cover pages as images to prepend to PDF documents. Full CSS support including web fonts.
Render invoice HTML to a pixel-perfect image, then convert to PDF โ or send as PNG for instant preview without download.
POST any HTML. Receive raw image bytes.
curl
curl -X POST 'https://snapapi.tech/v1/render' \ -H 'Content-Type: application/json' \ -d '{ "html": "<div style=\"background:#0f172a;color:#22c55e;padding:40px;font-size:32px;font-family:monospace\">Hello, SnapAPI</div>", "width": 1200, "height": 630, "format": "png", "api_key": "YOUR_KEY" }' \ --output og-card.png
Response is raw PNG bytes โ pipe directly to a file, return from your API, or base64-encode for inline use.
Node.js
const fs = require('fs'); const html = ` <div style="background:#0f172a;color:#f1f5f9;padding:80px; font-family:sans-serif;width:1200px;height:630px; display:flex;flex-direction:column;justify-content:center"> <h1 style="font-size:52px;font-weight:800;margin-bottom:16px"> My Blog Post Title </h1> <p style="font-size:24px;color:#94a3b8">A short description goes here</p> </div> `; const res = await fetch('https://snapapi.tech/v1/render', { method: 'POST', headers: { 'x-api-key': process.env.SNAPAPI_KEY, 'Content-Type': 'application/json' }, body: JSON.stringify({ html, width: 1200, height: 630, format: 'png' }) }); fs.writeFileSync('og-card.png', Buffer.from(await res.arrayBuffer()));
Set any width and height โ or use these proven sizes for common formats.
| Format | Width | Height | Used for |
|---|---|---|---|
| OG Image | 1200px | 630px | Twitter, Facebook, LinkedIn link previews |
| Twitter Card | 1200px | 600px | Twitter summary_large_image card |
| Instagram Square | 1080px | 1080px | Instagram posts, Pinterest |
| Email Header | 600px | 200px | Email template header images |
| Custom | any | any | Reports, dashboards, certificates |
Free tier: 100 renders/month โ no credit card required. Each render costs one API call, same as any other endpoint. Render is available on Starter plans and above ($9/mo for 1,000 calls). The render endpoint is not available on the free tier for hosted use โ but the free API key unlocks all other endpoints. See full pricing โ
Free API key โ no credit card, no setup, active in 30 seconds.
Get Free API Key โ