Design invoices and receipts in HTML/CSS. Send data via API, get back pixel-perfect images for emails, Slack notifications, or archival.
// Generate an invoice image from your HTML template const html = ` <div style="width:800px;padding:48px;background:white;font-family:sans-serif"> <div style="display:flex;justify-content:space-between;margin-bottom:40px"> <div> <div style="font-size:24px;font-weight:bold;color:#0f172a">INVOICE</div> <div style="color:#64748b;margin-top:4px">#${invoice.number}</div> </div> <div style="text-align:right;color:#64748b;font-size:14px"> ${invoice.company}<br>${invoice.date} </div> </div> <table style="width:100%;border-collapse:collapse;font-size:14px"> <tr style="border-bottom:2px solid #e2e8f0"> <th style="text-align:left;padding:12px 0;color:#64748b">Item</th> <th style="text-align:right;padding:12px 0;color:#64748b">Amount</th> </tr> ${invoice.items.map(i => \` <tr style="border-bottom:1px solid #f1f5f9"> <td style="padding:12px 0">\${i.name}</td> <td style="text-align:right;padding:12px 0">$\${i.amount}</td> </tr> \`).join('')} <tr> <td style="padding:16px 0;font-weight:bold;font-size:18px">Total</td> <td style="text-align:right;padding:16px 0;font-weight:bold;font-size:18px; color:#22d3ee">$${invoice.total}</td> </tr> </table> </div> `; const res = await fetch('https://renderpix.dev/v1/render', { method: 'POST', headers: { 'X-API-Key': 'rpx_your_key', 'Content-Type': 'application/json' }, body: JSON.stringify({ html, width: 800, height: 600, format: 'png' }) });