business template

Event Ticket Image Generator API

Print- and email-ready tickets with QR/barcode slot and perforated stub

Event Ticket template preview, a business image generated by the html2img API

Use cases for the Event Ticket Image Generator API

The Event Ticket template is the shortest path to a working event ticket 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:

  • Email-attached event tickets
  • Print-at-home conference badges
  • NFT and digital collectible tickets

How it works

1

Send a JSON payload

POST to the template endpoint with the values you want rendered. Authenticate with your API key.

2

We render the image

The template is rendered server-side as a 1200x630 PNG (or whatever dimensions the template defines).

3

You get back a URL

The response includes a CDN URL for the PNG. Cache it, embed it, attach it to a tweet, anything you need.

Quick example

A single cURL call to render a Event Ticket as a PNG:

curl -X POST https://app.html2img.com/api/v1/templates/event-ticket \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"event_name":"The Type Conference 2026","event_date":"Saturday, June 13, 2026","event_time":"9:00 AM \u2013 6:00 PM","venue":"Alexandra Palace \u00b7 London","attendee_name":"Margaret Lin","section":"Floor B","seat":"Row 14, Seat 22","ticket_id":"TYP-2026-09421","qr_url":"https://api.qrserver.com/v1/create-qr-code/?size=240x240&data=TYP-2026-09421","background_color":"#0F172A","accent_color":"#F97316"}'

For the full PHP, Node and Python equivalents, plus every input the template accepts, see the Event Ticket API reference. Setting up your key is covered in the authentication guide.

Inputs at a glance

A quick summary of what the Event Ticket template accepts. The full reference, including example values and array shapes, is in the docs.

Name Type Required
event_name string Required
event_date string Required
event_time string Optional
venue string Optional
attendee_name string Required
section string Optional
seat string Optional
ticket_id string Optional
qr_url url Optional
logo_url url Optional
background_color string Optional
accent_color string Optional

See the full inputs reference for descriptions, examples and validation rules.

Related templates

Ready to render your first Event Ticket?

Sign up free, grab an API key, send a payload. The pricing page covers the higher-volume plans if you outgrow the free tier.