Use Case · Invoice Images

HTML Invoice Image Generator

Turn any HTML invoice template into a pixel-perfect image in milliseconds. Send as email attachments, store as records, or embed in PDFs — via one API call.

JavaScriptrenderpix API example
async function generateInvoiceImage(invoice) {
  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>
        <h1 style="font-size:28px;color:#0f172a">INVOICE</h1>
        <p style="color:#64748b">#${invoice.number}</p>
      </div>
      <div style="text-align:right">
        <div style="font-size:36px;font-weight:700;color:#22d3ee">
          $${invoice.total}
        </div>
        <div style="color:${invoice.paid ? "#22c55e" : "#f59e0b"}">
          ${invoice.paid ? "PAID" : "DUE"}
        </div>
      </div>
    </div>
  </div>
  `;

  const res = await fetch("https://renderpix.dev/v1/render", {
    method: "POST",
    headers: { "X-API-Key": process.env.RENDERPIX_KEY },
    body: JSON.stringify({ html, width: 800, height: 1100, format: "png" }),
  });
  return res.arrayBuffer();
}

Common use cases

📧
Email attachments
Attach invoice images to transactional emails automatically.
📁
Cloud storage
Save invoice images to S3, GCS, or Cloudflare R2 for records.
📄
PDF embedding
Embed invoice image into PDFs alongside contract text.
🔔
Payment notifications
Include a rendered invoice image in payment confirmation webhooks.

Automate invoice image generation

Generate pixel-perfect invoice images from HTML with one API call. 100 free renders/month.

Get free API key