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 (device pixel ratio) | 0.1-5.0 |
Limits: width × height × zoom² may not exceed 40 megapixels; very long full-page captures are cut at that size.
Formats: svg is a screenshot embedded in an SVG container (not vector graphics); gif is reduced to 256 colours.
| 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 |
disable_javascript | bool | Render without running the page's JavaScript | true/false |
user_agent | string | Custom User-Agent for the request | max. 256 characters |
cookie | string | One cookie sent to the target site (URL sources only) | name=value |
crop_x, crop_y | int | Top-left corner of the area to capture | 0-10000 |
crop_w, crop_h | int | Size of the area to capture (both required) | 1-10000 |
lowquality | bool | Smaller JPG files (quality 50 unless quality is set) | 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": "2026-10-30T15: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 |
BLOCKED_TARGET | The source points to a private or internal address |
IMAGE_TOO_LARGE | width × height × zoom² exceeds 40 megapixels |
SOURCE_TOO_LARGE | Posted HTML is larger than 3 MB |
CONTENT_POLICY_VIOLATION | The posted HTML or the rendered page violates the Terms of Service (scam, phishing, fake documents) |
RATE_LIMIT_EXCEEDED | Too many requests per minute for this key |
DAILY_LIMIT_EXCEEDED / MONTHLY_LIMIT_EXCEEDED | Your account's daily or monthly quota is used up |
TOO_MANY_CONCURRENT_REQUESTS | More than 2 renders of your account running at the same time |
SERVER_BUSY | All renderers are busy - retry after the Retry-After seconds |
RENDERER_UNAVAILABLE | The rendering engine is temporarily unavailable (HTTP 503) - retry after the Retry-After seconds |
RENDER_FAILED | The page could not be rendered (see Details) |
| 200 | Success |
| 400 | Invalid parameters |
| 401 | Invalid, deactivated or unverified API key |
| 403 | Content policy violation |
| 413 | Posted HTML too large (max. 3 MB) |
| 429 | Rate limit, quota or concurrency limit exceeded (see Retry-After) |
| 500 | Rendering failed (see ErrorCode and Details) |
| 503 | Renderers busy or temporarily unavailable - retry after Retry-After seconds |