Generate Image API for Developers
Generate Image API built for teams that need reliable document automation at scale. Convert and process files with simple REST requests, predictable output quality, and production-grade uptime. Use it for webpage snapshots, HTML rendering, and preview generation workflows. Includes clear docs, SDK-ready endpoints, and quick testing in your browser.
What it does
Capture images from public URLs or raw HTML/CSS payloads.
Control viewport dimensions, full-page behavior, quality, and output mode.
Useful for snapshots, social previews, reports, and visual regression workflows.
Endpoint & Parameters
POST /v1/generateImage
URL Mode
Public URL to screenshot.
Browser viewport size. Defaults: 1280 × 720.
Capture full scrollable page (boolean).
load, domcontentloaded, networkidle, or commit.
Extra delay in ms after page load before capture.
Text of cookie consent button to click before screenshot.
HTML Mode
HTML markup to render.
CSS to inject after HTML.
Output image dimensions. Defaults: 1280 × 720.
Google Font names, pipe-separated. e.g. "Inter|Roboto".
Key-value object for {{placeholder}} substitution in HTML.
Common
url (default), base64, both, image/png/binary/file.
Image quality 30–100. Default 80.
Device pixel ratio 1–3. Use 2 for retina quality.
curl -X POST https://pdfapihub.com/api/v1/generateImage \
-H "CLIENT-API-KEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"viewPortWidth": 1920,
"viewPortHeight": 1080,
"full_page": false,
"output_format": "url"
}'