All /v1/* endpoints require an API key passed in the X-API-Key header.
X-API-Key: sk_live_your_api_key_here
Get your API key by signing up at the pricing page.
Capture a screenshot of any URL.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | yes | - | URL to capture (http/https) |
format | string | no | png | png, jpeg, or pdf |
width | number | no | 1280 | Viewport width (1-3840) |
height | number | no | 720 | Viewport height (1-2160) |
curl -H "X-API-Key: sk_live_..." \ "https://snapcap.dev/v1/screenshot?url=https://example.com&format=png" \ --output screenshot.png
const res = await fetch(
"https://snapcap.dev/v1/screenshot?url=https://example.com",
{ headers: { "X-API-Key": "sk_live_..." } }
);
const blob = await res.blob();
// Use the PNG blob
import requests
res = requests.get(
"https://snapcap.dev/v1/screenshot",
params={"url": "https://example.com", "format": "png"},
headers={"X-API-Key": "sk_live_..."}
)
with open("screenshot.png", "wb") as f:
f.write(res.content)
Generate a dynamic OG image from a template.
| Field | Type | Required | Description |
|---|---|---|---|
template | string | yes | Template name |
data | object | yes | Template fields |
| Param | Type | Default | Description |
|---|---|---|---|
format | string | png | png or jpeg |
width | number | 1200 | Image width (1-3840) |
height | number | 630 | Image height (1-2160) |
curl -X POST "https://snapcap.dev/v1/og" \
-H "X-API-Key: sk_live_..." \
-H "Content-Type: application/json" \
-d '{"template":"blog-post","data":{"title":"Hello World","author":"Jane"}}' \
--output og.png
const res = await fetch("https://snapcap.dev/v1/og", {
method: "POST",
headers: {
"X-API-Key": "sk_live_...",
"Content-Type": "application/json"
},
body: JSON.stringify({
template: "blog-post",
data: { title: "Hello World", author: "Jane" }
})
});
const blob = await res.blob();
import requests
res = requests.post(
"https://snapcap.dev/v1/og",
headers={"X-API-Key": "sk_live_...", "Content-Type": "application/json"},
json={"template": "blog-post", "data": {"title": "Hello World", "author": "Jane"}}
)
with open("og.png", "wb") as f:
f.write(res.content)
blog-postRequired: title, author
Optional: date, readingTime, logo
productRequired: name, price
Optional: imageUrl, rating
social-profileRequired: name
Optional: bio, avatarUrl, followers, following
eventRequired: title, date
Optional: location, speaker
genericRequired: title
Optional: subtitle, bgColor, bgImage, logo
Returns a JSON list of available templates with their field schemas.
Returns recent API usage entries.
| Param | Type | Default | Description |
|---|---|---|---|
limit | number | 100 | Max entries to return |
| Endpoint | Method | Description |
|---|---|---|
/billing/checkout | POST | Create Stripe checkout session |
/billing/webhook | POST | Stripe webhook handler |
/billing/portal | GET | Redirect to Stripe billing portal |
/billing/status | GET | Current plan + usage (requires API key) |
All errors return JSON:
{ "error": "Description of what went wrong" }
| Status | Meaning |
|---|---|
| 400 | Invalid parameters or missing required fields |
| 401 | Missing or invalid API key |
| 429 | Rate limit or monthly render limit exceeded |
| 500 | Internal server error |
| Plan | Requests/min | Renders/month |
|---|---|---|
| Free | 10 | 100 |
| Starter ($9/mo) | 60 | 5,000 |
| Pro ($29/mo) | 120 | 50,000 |
| Business ($79/mo) | 300 | 200,000 |