HTML to Image Documentation

Pick the path that matches what you want to do.

Core sections

Getting Started

The two endpoints, response format, error codes, and a working first request.

Quick Start

The shortest path from a fresh API key to your first rendered PNG, plus how monthly credits work.

Authentication

Generate a key, send it in the X-API-Key header, rotate keys safely.

Parameters Reference

Every parameter the HTML and Screenshot APIs accept. Defaults, ranges, common values.

Examples

Worked code samples for invoices, charts, OG images, calendar events and more.

Template API Reference

The developer reference for every named template: inputs, defaults, response shape, error codes and code samples. (For sample renders and use cases, see the templates gallery.)

Testing & Debugging

Reproduce and inspect errors locally, including validation failures, rate limits and authentication problems.

JavaScript Support

How ms_delay and wait_for_selector let pages finish rendering client-side JavaScript before the screenshot is taken.

Error handling and rate limits

The API uses a consistent error envelope: 422 for validation failures, 401 for missing or invalid keys, 404 for unknown routes or template slugs, and 429 when you exceed your monthly credits or hit the rate limit. The Getting Started guide lists every status code, and the Testing & Debugging guide shows how to reproduce each one.

Pick your language