Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: snaplab Rendering API
version: 1.0.0
summary: Turn any URL or HTML into a screenshot, a PDF, or a social image.
description: 'snaplab renders web pages with a real headless Chromium and hands you the bytes.
- `POST|GET /api/render` — URL **or** raw HTML → PNG / JPEG / WebP / AVIF / PDF, viewport or full page, retina, dark mode, element clipping.
- `POST|GET /api/render/image` — HTML (or a `{{ template }}` + `data`) → a fixed-size image. The Open Graph card path.
- `POST /api/render/preview` — unauthenticated, rate-limited demo render.
- `POST /api/tools/*` — key-less public tools, 20 renders/day/IP, always answered with a hosted URL.
- `/mcp` — a stateless Streamable-HTTP MCP server exposing `screenshot`, `pdf`, `html_to_image` and `usage`.
## Authentication
Every endpoint except `/api/health`, `/api/render/preview` and `/api/tools/*` needs an API key. Keys look like `sk_…`
and are created in the dashboard or through `POST /api/keys`.
1. `Authorization: Bearer sk_…` — the header form, accepted everywhere.
2. Signed query parameters — `GET /api/render` and `GET /api/render/image` only. See below.
3. The browser session cookie, for the dashboard itself.
### Signed URLs
Putting a raw key in an `` leaks it. Sign the URL instead: append `keyId` (the API key''s id) and
`sig=hex(HMAC_SHA256(signing_secret, canonical))`, optionally with an `expires` Unix timestamp. The canonical string is
every query pair except `sig`, sorted by name then value and joined with `&`. The per-key signing secret and a URL
builder live in the dashboard under Keys.
## Options
Options are camelCase and identical between the JSON body and the query string. In a query string, booleans are
`true`/`1` and `false`/`0`, `hideSelectors` is a comma-separated list, and PDF options take either the dotted form
(`pdf.format=A4`) or the flat alias (`pdfFormat=A4`).
## Caching and quota
Identical options are served from a shared cache for 24h. **Cache hits and failed renders do not count against your
quota** — only fresh, successful renders do. Renders carry `X-Snaplab-Cache`, `X-Snaplab-Duration-Ms`,
`X-Snaplab-Fingerprint` and `X-Snaplab-Quota-Remaining`.
Pass `cache: false` to force a fresh render.
## Errors
Errors are JSON: `{"error":"…","code":"…"}`. Messages are for humans; codes are stable.
| Status | Code | Meaning |
| --- | --- | --- |
| 400 | — | A parameter is missing, malformed, out of range, or the target is a private/blocked address. |
| 401 | `unauthorized` | Missing, unknown or revoked API key; or a bad signature. |
| 402 | `payment_required` | The subscription is past due. |
| 422 | `selector_not_found` | The page rendered but `selector` matched nothing. |
| 429 | `quota_exceeded` | The monthly render allowance is used up. |
| 429 | — | Too many requests per minute for your plan. |
| 502 | `upstream` | The target site was unreachable. |
| 503 | `capacity` / `not_ready` | The render queue is saturated, or the browsers are still starting. Retry shortly. |
| 504 | `timeout` | The page did not finish in time. |
## Plans
| Plan | Renders / month | Price | Rate | Concurrency |
| --- | --- | --- | --- | --- |
| free | 100 | $0 | 30/min | 1 |
| starter | 2,000 | $9 | 120/min | 3 |
| pro | 10,000 | $29 | 300/min | 5 |
| business | 40,000 | $79 | 600/min | 10 |'
termsOfService: https://snaplab.dev/terms
contact:
name: snaplab support
url: https://snaplab.dev/docs
email: snaplab.dev
license:
name: MIT
identifier: MIT
servers:
- url: https://snaplab.dev
description: Production
security:
- bearerAuth: []
tags:
# --- truncated at 32 KB (49 KB total) ---
# Full source: https://artifacts.apis.io/snaplab-dev/openapi/snaplab-dev-rendering-api-openapi.yml