Generate Image
/install generate-image-from-html
Generate Image
What It Does
Renders a webpage or HTML content to a PNG image using headless Chromium. Supports URL screenshots and HTML-to-image rendering with full customization.
When to Use
- Take a screenshot of a live webpage
- Render HTML/CSS to a PNG image (social cards, banners, certificates)
- Generate full-page scrollable screenshots
- Create retina-quality images with custom dimensions
Required Inputs
You must provide one of:
html_content— raw HTML string to renderurl— a public URL to screenshot
Authentication
Send 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.
Use Cases
- Social Media Cards — Generate OG images, Twitter cards, or Instagram story images from HTML templates
- Email Banners — Create personalized email header images with dynamic content
- Website Screenshots — Capture full-page or viewport screenshots of live websites for monitoring or previews
- Certificate Images — Render certificates as PNG images for sharing on social media
- Product Mockups — Generate product images with dynamic text overlays
- Thumbnail Generation — Create consistent thumbnail images for blog posts or video previews
- QR Code Cards — Render HTML with embedded QR codes as shareable images
Key Options
| 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 |
Rate Limits
| Tier | Requests/min |
|---|---|
| Free/Basic/Pro | 10 |
| Enterprise | 30 |
| Business | 100 |
Example Usage
curl -X POST https://pdfapihub.com/api/v1/generateImage \
-H "CLIENT-API-KEY: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"html_content": "\x3Cdiv style=\"padding:40px;background:#4F46E5;color:white;\">\x3Ch1>Hello {{name}}\x3C/h1>\x3C/div>",
"dynamic_params": { "name": "World" },
"width": 800,
"height": 400,
"output_format": "url"
}'
Notes
- Files are automatically deleted after 30 days
- Maximum output file size depends on your plan tier
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install generate-image-from-html - 安装完成后,直接呼叫该 Skill 的名称或使用
/generate-image-from-html触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Generate Image 是什么?
Generate a PNG image from HTML content or a public URL using headless Chromium. Supports custom dimensions, retina quality, full-page screenshots, cookie con... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 76 次。
如何安装 Generate Image?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install generate-image-from-html」即可一键安装,无需额外配置。
Generate Image 是免费的吗?
是的,Generate Image 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Generate Image 支持哪些平台?
Generate Image 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Generate Image?
由 Rishabh Dugar(@rishabhdugar)开发并维护,当前版本 v1.0.0。