Install
openclaw skills install generate-image-from-htmlGenerate a PNG image from HTML content or a public URL using headless Chromium. Supports custom dimensions, retina quality, full-page screenshots, cookie consent handling, and dynamic parameters.
openclaw skills install generate-image-from-htmlRenders a webpage or HTML content to a PNG image using headless Chromium. Supports URL screenshots and HTML-to-image rendering with full customization.
You must provide one of:
html_content — raw HTML string to renderurl — a public URL to screenshotSend your API key in the CLIENT-API-KEY header.
Get your free API key at https://pdfapihub.com. Full API documentation is available at https://pdfapihub.com/docs.
| Parameter | Description |
|---|---|
output_format | url (default), base64, both, image/png/binary/file |
width / height | Output image dimensions in pixels |
deviceScaleFactor | 1 (default), 2 for retina quality |
full_page | true for full scrollable screenshot (URL mode) |
wait_until | load, domcontentloaded, networkidle, commit |
cookie_accept_text | Auto-click cookie consent before screenshot |
font | Google Font names, pipe-separated |
dynamic_params | Key-value object for {{placeholder}} replacement |
| Tier | Requests/min |
|---|---|
| Free/Basic/Pro | 10 |
| Enterprise | 30 |
| Business | 100 |
curl -X POST https://pdfapihub.com/api/v1/generateImage \
-H "CLIENT-API-KEY: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"html_content": "<div style=\"padding:40px;background:#4F46E5;color:white;\"><h1>Hello {{name}}</h1></div>",
"dynamic_params": { "name": "World" },
"width": 800,
"height": 400,
"output_format": "url"
}'