HTML to Image Documentation
Pick the path that matches what you want to do.
- I want to send my own HTML and get a PNG back. Read the html parameter docs.
- I want a screenshot of an existing URL. Read the url parameter docs.
- I want a pre-designed image with my data slotted in. Browse the templates gallery.
Core sections
Getting Started
The four 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 free credits work.
Authentication
Generate a key, send it in the X-API-Key header, rotate keys safely.
Account Status
Check your plan and credit balance with GET /api/me. Free to call and never consumes a credit.
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, timeouts and authentication problems.
JavaScript Support
How JavaScript runs on the HTML endpoint, what the Screenshot endpoint can and cannot do, and how ms_delay and wait_for_selector control capture timing.
MCP Server
Render images straight from Claude, Cursor or any MCP client. Available on paid plans.
Integrations
Official SDKs, framework packages, CMS plugins and CI tooling: PHP, Laravel, JavaScript, Python, Django, Ruby and Rails, WordPress, Statamic, Craft CMS and GitHub Actions. Each page is a complete implementation guide for that ecosystem.
Error handling
The API uses a consistent error envelope: 400 for validation failures (422 on the Templates API), 401 for missing or invalid keys, 402 when you are out of credits, 403 when the account has no active plan, 404 for unknown routes or template slugs, 504 for renders that exceed the sync budget and 500 for service errors. The Getting Started guide lists every status code, and the Testing & Debugging guide shows how to reproduce each one.
Pick your stack
- PHP - the official Composer SDK, plus raw cURL and Guzzle.
- Laravel - Blade views to images and PDFs, queued jobs, storage on any disk.
- JavaScript - Node, TypeScript, Bun, Deno, Next.js and Nuxt, all server-side.
- Python - sync and async clients, Flask, FastAPI and Celery, plus a CLI.
- Django - automatic Open Graph images for your models.
- Ruby and Rails - the official gem, Active Job and Active Storage.
- WordPress - an Open Graph image for every post and page.
- Statamic and Craft CMS - entry-driven social images from your own templates.
- GitHub Actions - render assets in CI, with input hashing so unchanged runs cost nothing.
The integrations hub has the full list. Each page covers installation, configuration, rendering, storage, error handling and troubleshooting for that ecosystem; this section covers the API itself.