Send a JSON payload
POST to the template endpoint with the values you want rendered. Authenticate with your API key.
E-commerce product cards with price, optional sale price, and CTA
The Product Card template is the shortest path to a working product image generator api from your stack. Send a small JSON payload, get back a tested PNG that fits your brand. No browser, no headless Chrome wrangling, no design tooling on your side.
Common reasons people reach for this template:
POST to the template endpoint with the values you want rendered. Authenticate with your API key.
The template is rendered server-side as a 1200x630 PNG (or whatever dimensions the template defines).
The response includes a CDN URL for the PNG. Cache it, embed it, attach it to a tweet, anything you need.
A single cURL call to render a Product Card as a PNG:
curl -X POST https://app.html2img.com/api/v1/templates/product-card \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"product_name":"Linden Lounge Chair","product_subtitle":"Solid oak frame with wool boucle upholstery","price":"$1,290","sale_price":"$890","badge":"Limited stock","cta_label":"Shop the Linden \u2192","product_image_url":"https://picsum.photos/seed/product-card/720/720","brand_name":"Northwind Home","background_color":"#F5F1EA","accent_color":"#1F2937"}' For the full PHP, Node and Python equivalents, plus every input the template accepts, see the Product Card API reference. Setting up your key is covered in the authentication guide.
A quick summary of what the Product Card template accepts. The full reference, including example values and array shapes, is in the docs.
| Name | Type | Required |
|---|---|---|
| product_name | string | Required |
| product_subtitle | string | Optional |
| price | string | Required |
| sale_price | string | Optional |
| badge | string | Optional |
| cta_label | string | Optional |
| product_image_url | url | Optional |
| brand_name | string | Optional |
| logo_url | url | Optional |
| background_color | string | Optional |
| accent_color | string | Optional |
See the full inputs reference for descriptions, examples and validation rules.
Sign up free, grab an API key, send a payload. The pricing page covers the higher-volume plans if you outgrow the free tier.