Quick Start
1. Get your API key
Sign in to the dashboard, click + New key, and copy the value shown. You'll see the raw key once — store it somewhere safe.
2. Submit a render job
POST your HTML (and optional CSS, dimensions, format). You get a job ID back immediately — rendering happens asynchronously.
curl -X POST https://api.html2media.com/images \
-H "X-API-Key: htm_..." \
-H "Content-Type: application/json" \
-d '{"html": "<h1>Hello</h1>", "css": "h1{color:#e11d48}", "width": 1080, "height": 1080, "format": "png"}'
# {"job_id":"abc","status":"queued"}3. Poll for the result
When status is done, url points at the rendered image.
curl https://api.html2media.com/images/abc -H "X-API-Key: htm_..."
# {"status":"done","url":"https://.../result.png","error":null}4. Get notified with a webhook
Pass callback_url in the request body — html2media POSTs the final job state there when the render finishes, so you don't have to poll.
curl -X POST https://api.html2media.com/images \
-H "X-API-Key: htm_..." \
-d '{"html": "<h1>Hi</h1>", "callback_url": "https://you.com/render-done"}'