HTML to IMG API

rendering service that returns PNG images from HTML input Works with raw HTML, or presets with custom inputs. Works with TailwindCSS classes.

Stats

Total renders
Avg render time

Examples

headline
headline preset
subtitle_comic
announcement preset

GET /presets

Returns a list of available preset names.

["headline","hero","statement","announcement","quote","watermark","kicker","badge"]

POST /render/preset

Render a named preset. Optionally override dimensions and pass custom options.

{
  "preset": "headline",
  "width": 1200,
  "height": 630,
  "customOptions": {
    "1": "Hello World",
    "2": "This is a subtitle"
  }
}

POST /render/raw

Render raw HTML. Tailwind classes are available.

{
  "html": "<div class='bg-black text-white p-8'><h1>Hello</h1></div>",
  "width": 1200,
  "height": 800
}

The response is a PNG binary.