Everything you need to integrate SnapForge into your application.
Authenticate by passing your API key as a Bearer token in the Authorization header, or as a key query parameter.
# Via header (recommended)
curl https://api.snapforgehq.com/v1/og?template=blog-post&title=Hello \
-H "Authorization: Bearer sf_live_your_key_here"
# Via query parameter (useful for meta tags)
<meta property="og:image"
content="https://api.snapforgehq.com/v1/og?template=blog-post&title=Hello&key=sf_live_your_key_here" />Base URL: https://api.snapforgehq.com
/v1/ogGenerate an OG image via query parameters. Ideal for use directly in HTML meta tags.
| Name | Type | Required | Description |
|---|---|---|---|
template | string | Yes | Template ID: blog-post, social, or minimal |
title | string | Yes | Main title text |
subtitle | string | No | Subtitle text (blog-post template) |
author | string | No | Author name (blog-post template) |
description | string | No | Description text (social template) |
brand | string | No | Brand name (social template) |
color | string | No | Background color hex (minimal template) |
text_color | string | No | Text color hex (minimal template) |
width | number | No | Image width in pixels (default: 1200) |
height | number | No | Image height in pixels (default: 630) |
format | string | No | Output format: png (default), jpeg, webp |
key | string | Yes | Your API key (alternative to Authorization header) |
/v1/ogGenerate an OG image via JSON body.
{
"template": "blog-post",
"params": {
"title": "My Blog Post",
"subtitle": "A deep dive into...",
"author": "Jane Doe"
},
"width": 1200,
"height": 630,
"format": "png"
}/v1/screenshotCapture a screenshot of a URL or raw HTML. Requires Starter plan or higher.
{
"url": "https://example.com",
"width": 1280,
"height": 720,
"full_page": false,
"selector": "#main",
"format": "png",
"delay": 0
}/v1/usageGet your current usage stats for the billing period.
{
"used": 450,
"limit": 5000,
"month": "2026-03",
"planId": "starter"
}/v1/templatesList all available templates with their parameter definitions.
const response = await fetch(
"https://api.snapforgehq.com/v1/og",
{
method: "POST",
headers: {
"Authorization": "Bearer sf_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
template: "blog-post",
params: {
title: "My Blog Post",
subtitle: "Written with love",
author: "Jane Doe",
},
}),
}
);
const imageBlob = await response.blob();
// Use the blob as needed (save, display, upload, etc.)import requests
response = requests.post(
"https://api.snapforgehq.com/v1/og",
headers={"Authorization": "Bearer sf_live_your_key_here"},
json={
"template": "blog-post",
"params": {
"title": "My Blog Post",
"subtitle": "Written with love",
"author": "Jane Doe",
},
},
)
with open("og-image.png", "wb") as f:
f.write(response.content)curl -X POST "https://api.snapforgehq.com/v1/og" \
-H "Authorization: Bearer sf_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"template":"blog-post","params":{"title":"Hello World"}}' \
-o og-image.png| Status | Error | Description |
|---|---|---|
| 400 | bad_request | Invalid parameters. Check the error message for details. |
| 401 | unauthorized | Missing or invalid API key. |
| 429 | rate_limit_exceeded | Monthly generation limit reached. Upgrade your plan. |
| 500 | generation_failed | Image generation failed. Contact support if this persists. |
Rate limits are based on your plan's monthly generation quota. Cache hits do not count against your quota. Check the X-RateLimit-Remaining and X-RateLimit-Limit response headers.
| Plan | Monthly Limit | Overage |
|---|---|---|
| Free | 100 | Hard cutoff |
| Starter | 5,000 | $0.005/image |
| Pro | 25,000 | $0.003/image |
| Business | 100,000 | $0.002/image |