All /v1/* routes require an x-api-key header. Requests without a valid key return 401.
x-api-key: <your-api-key>
Renders HTML/CSS (or a live URL) to an image and returns a fetchable URL.
curl -X POST https://html2image.humanmd.club/v1/image \
-H "x-api-key: $API_KEY" \
-H "content-type: application/json" \
-d '{
"html": "<div style=\"padding:40px;background:#000;color:#fff;font-size:32px;\">Hello HMMD</div>",
"viewport_width": 1080,
"viewport_height": 1350,
"format": "png"
}'
Response:
{
"id": "uuid",
"format": "png",
"url": "https://html2image.humanmd.club/v1/image/uuid.png",
"created_at": "2026-06-17T19:31:32.660Z"
}
| param | default | notes |
|---|---|---|
html | — | HTML to render (or pass url to screenshot a live page instead) |
css | — | injected as a <style> tag |
google_fonts | — | e.g. Figtree:wght@400;600 |
viewport_width | 1200 | |
viewport_height | 630 | |
device_scale | 1 | pixel density |
format | png | png, jpeg, webp |
selector | — | CSS selector to screenshot a single element instead of full page |
ms_delay | 0 | wait this many ms before capturing |
Fetches a previously rendered image. No API key needed — filenames are unguessable UUIDs, so the URL itself is the access control (same model as hcti.io). Files are auto-deleted after 24h.
Liveness check. Returns { "status": "ok" }.
| Base URL | https://html2image.humanmd.club |
| Hosted on | VPS vps.humanmd.club, Docker, behind Coolify/Traefik (Let's Encrypt TLS) |
| Renderer | Headless Chromium via Puppeteer |
| Storage retention | 24 hours, auto-cleaned hourly |