Image generation templates

Pre-built designs for the images you keep needing: Open Graph cards, social posts, certificates, quote cards, charts and more. Send a JSON payload, get back a PNG.

Every template is a single API call. Read the templates API reference for the full request and response shape, or pick a design below.

social

Frequently asked questions

What is an html2img template?

A template is a named, parameterised image design hosted by html2img. You send a JSON payload with values like a title, subtitle or background, and the API returns a rendered PNG. The visual design is maintained on our side, so you do not write any HTML or CSS.

How do templates differ from raw HTML or URL requests?

The HTML and URL endpoints render whatever markup or web page you point them at. Templates skip the markup step. You hit a single named endpoint, pass the data, and receive a tested, designed image. Quicker to integrate, easier to keep on-brand, and faster to render.

Can I preview a template before signing up?

Yes. Each template page on this site shows a sample render so you can see exactly what the output looks like. The free tier includes 25 image conversions per month, enough to wire it up against real data before paying.

How do I add a custom template?

Custom templates are built on request. Send us your design (Figma, Sketch or HTML/CSS) along with the variable fields you need, and we build it into the template library. Email [email protected] to start the process.

Try a template in two minutes

Sign up for a free account, pick a template, send your first JSON payload. 25 free renders every month.