Last updated: June 08, 2026 · Updated quarterly to reflect current pricing and features.
Tutorial · Open Source CLI Tool
wkhtmltoimage API Tutorial (2026): Setup, Examples, and a Simpler Alternative
June 08, 2026
5 min read
Open Source CLI Tool
This tutorial covers how to get started with the wkhtmltoimage API — authentication, key parameters, and code examples. We also show why developers often end up choosing a simpler alternative.
Getting started with the wkhtmltoimage API
wkhtmltoimage (Open source HTML to image command line tool) provides a REST API for cli-based html rendering. Here's how to set it up and make your first API call.
Authentication
Most wkhtmltoimage API requests require authentication via API key. You'll find your key in the wkhtmltoimage dashboard after signing up.
Making your first request
# wkhtmltoimage — example request
curl -X POST https://api.wkhtmltoimage.com/v1/render \
-H "Authorization: Bearer YOUR_WKHTMLTOIMAGE_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "width": 1200, "height": 630}'
Key parameters
- width / height — output image dimensions
- format — PNG, JPEG, or WebP
- html — HTML string to render
Limitations to be aware of
No native n8n or Make.com node. No built-in batch endpoint.
A simpler alternative for HTML rendering
If you're using wkhtmltoimage specifically for HTML-to-image rendering and find the setup complex, RenderPix offers a simpler API with native n8n support:
# One API call. That's all.
curl -X POST https://renderpix.dev/v1/render \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"html": "<div style=\"width:1200px;height:630px;background:#0f0f0f;color:#fff;display:flex;align-items:center;justify-content:center;font-size:48px\">Hello, RenderPix</div>",
"width": 1200, "height": 630, "format": "png"
}' --output card.png
| Feature | wkhtmltoimage | RenderPix |
| Starting price | Free | $9/mo |
| Free tier | unlimited | 100 renders/mo |
| Raw HTML input | ✓ | ✓ Full HTML/CSS |
| n8n native node | ✗ | ✓ Native node |
| Batch rendering | ✗ | ✓ Built-in |
| Template variables | ✗ | ✓ {key} syntax |
| Async callback | ✗ | ✓ |
| PNG / JPEG / WebP | ✓ | ✓ |
| Primary use case | CLI-based HTML rendering | HTML image generation |
Try RenderPix free — no credit card needed
100 renders/month on the free plan. Full HTML control. Native n8n node.
Get your free API key →
More about wkhtmltoimage
Compare other tools