Get your personal API key instantly. No credit card required.
Create AccountAlready have an account? Login here
https://www.html2image.net/api/api.php?
Every request must include your personal API key (format h2i_..., from your
dashboard). The API uses an API key only —
there is no username / password (HTTP Basic Auth). Choose any one of these
three methods:
| Method | How | Example |
|---|---|---|
| Query parameter | Append key to the URL |
?key=h2i_your_key |
| HTTP header | X-API-Key request header |
X-API-Key: h2i_your_key |
| Bearer token | Authorization request header |
Authorization: Bearer h2i_your_key |
In an n8n HTTP Request node, do not use the “Username / Password” (Basic Auth) option — leave those blank. Authenticate with the API key instead:
X-API-Keyh2i_your_keyAlternatively set Authentication to None and put the key straight in
the URL as ?key=h2i_your_key. To render raw HTML, use method POST,
body type Form-Urlencoded, with a field named source containing your HTML.
| Parameter | Type | Description | Example |
|---|---|---|---|
key | string | Your personal API key | key=abc123 |
source | string | URL of the page OR HTML code via POST | source=https://example.com |
type | string | Output format: png, jpg, gif, svg, pdf | type=png |
You can provide content in two ways:
GET /api/api.php?key=[YOUR_KEY]&source=https://example.com&type=png
Send HTML directly for dynamic content generation:
POST /api/api.php?key=[YOUR_KEY]&type=svg
Content-Type: application/x-www-form-urlencoded
source=<html><body><h1>Hello World</h1></body></html>
| Parameter | Type | Description | Range |
|---|---|---|---|
width | int | Width in pixels | 1-4096 |
height | int | Height in pixels | 1-4096 |
quality | int | Quality (JPG only) | 1-100 |
zoom | float | Zoom factor | 0.1-5.0 |
| Parameter | Type | Description | Values |
|---|---|---|---|
delay | int | JavaScript wait time (ms) | 0-30000 |
fullpage | bool | Capture entire page | true/false |
transparent | bool | Transparent background (PNG) | true/false |
grayscale | bool | Grayscale image | true/false |
https://www.html2image.net/api/api.php?key=[YOUR_KEY]&source=https://example.com&type=png
https://www.html2image.net/api/api.php?key=[YOUR_KEY]&source=https://example.com&type=png&fullpage=true&width=1200
https://www.html2image.net/api/api.php?key=[YOUR_KEY]&source=https://example.com&type=jpg&quality=95&width=1920
{
"Status": "OK",
"Link": "https://www.html2image.net/api/tmp/.../image.png",
"Expires": "2024-12-24T15:30:00+01:00"
}
When rendering fails, you get a detailed error response with codes and hints:
{
"Status": "Error",
"Message": "Error creating image. Please check your parameters.",
"ErrorCode": "FONT_LOAD_ERROR,NETWORK_ERROR",
"Details": "Google Fonts could not be loaded (HTTP 400)",
"Warnings": ["Failed to load optional resource"],
"Hints": ["Check your Google Fonts URL syntax"]
}
| Code | Description |
|---|---|
FONT_LOAD_ERROR | Google Fonts or custom fonts failed to load |
RESOURCE_NOT_FOUND | Image or resource not found |
NETWORK_ERROR | Network error during rendering |
SSL_ERROR | SSL/TLS certificate error |
TIMEOUT_ERROR | Request timed out |
DNS_ERROR | Domain could not be resolved |
| 200 | Success |
| 400 | Invalid parameters |
| 401 | Invalid API key |
| 429 | Rate limit exceeded |
| 500 | Server error |