SnapForge docs

Introduction

SnapForge is a 6-in-1 developer API for generating OG images, PDFs, QR codes, URL metadata, image resizing, and placeholder images. It was designed with one principle: make common web development tasks trivially easy.

What makes SnapForge different:

  • URL Mode — paste a URL in your HTML. No API key, no code, no signup. Just works.
  • API Mode — full REST API with every option. One key, six tools.
  • 10+ OG templates and 10+ PDF templates — professionally designed, ready to use.
  • Fast — QR codes in <50ms, images in <300ms, OG/PDF in <2s.

Quick start

Option A: Start in 10 seconds (URL Mode)

Paste this into any HTML page. No signup required:

html
<img src="https://usesnapforge.com/qr?text=https://example.com" alt="QR Code" />

That's it. A QR code will render wherever you place the tag. Works with OG images too:

html
<img src="https://usesnapforge.com/og/blog?title=My+First+Post&theme=dark" />

Option B: Start in 2 minutes (API Mode)

1. Create a free account at usesnapforge.com/register

2. Copy your API key from the dashboard (starts with sk_live_)

3. Make your first API call:

curl
curl -X POST https://usesnapforge.com/api/v1/og \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"template":"blog","data":{"title":"Hello World"}}'
javascript
const res = await fetch("https://usesnapforge.com/api/v1/og", {
  method: "POST",
  headers: {
    "Authorization": "Bearer sk_live_YOUR_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    template: "blog",
    data: { title: "Hello World" }
  }),
});
const imageBlob = await res.blob();

Authentication

API mode requires authentication via an API key. URL mode does not require authentication.

Getting your API key

Register at /register, then find your key in the dashboard. Keys start with sk_live_.

Using your API key

Pass it in the Authorization header:

http
Authorization: Bearer sk_live_YOUR_KEY

OG Images

Generate beautiful Open Graph images for social media sharing. Choose from 10 professionally designed templates.

GET/og/:templateURL mode — no auth, watermark on free
POST/api/v1/ogAPI mode — auth required, no watermark on paid

URL Mode

html
<meta property="og:image" content="https://usesnapforge.com/og/blog?title=My+Post&theme=dark" />

API Mode

curl
curl -X POST https://usesnapforge.com/api/v1/og \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"template":"blog","data":{"title":"My Post","theme":"dark"}}'
javascript
const res = await fetch("https://usesnapforge.com/api/v1/og", {
  method: "POST",
  headers: {
    Authorization: "Bearer sk_live_YOUR_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    template: "blog",
    data: { title: "My Post", author: "Jane", theme: "dark" }
  }),
});
python
import requests
r = requests.post("https://usesnapforge.com/api/v1/og",
    headers={"Authorization": "Bearer sk_live_YOUR_KEY"},
    json={"template": "blog", "data": {"title": "My Post"}})
with open("og.png", "wb") as f:
    f.write(r.content)

Available templates

All templates render at 1200x630px (standard OG size) and support light and dark themes.

NameTypeRequiredDefaultDescription
templatestringYesTemplate name: blog, social, product, event, article, github, minimal, gradient, stats, announcement
titlestringYesMain title text (max 200 chars)
themestringNolight"light" or "dark"
accent_colorstringNo#8B5CF6Hex accent color
subtitlestringNoSecondary text (social, gradient, announcement)
authorstringNoAuthor name (blog)
datestringNoDate string (blog, event)

PDF Generation

Generate pixel-perfect PDFs from HTML or pre-built templates. Invoices, reports, certificates, and more.

POST/api/v1/pdfAuth required

From a template

javascript
const res = await fetch("https://usesnapforge.com/api/v1/pdf", {
  method: "POST",
  headers: {
    Authorization: "Bearer sk_live_YOUR_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    template: "invoice",
    data: {
      company: { name: "Acme", address: "123 St", email: "a@b.com", phone: "555" },
      client: { name: "Client Co", address: "456 Ave", email: "c@d.com" },
      invoice_number: "INV-001",
      issue_date: "2026-01-15",
      due_date: "2026-02-15",
      items: [{ description: "Design work", quantity: 10, unit_price: 150 }],
      tax_rate: 20,
      currency: "USD",
    },
  }),
});

From raw HTML

curl
curl -X POST https://usesnapforge.com/api/v1/pdf \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Hello World</h1><p>This is my PDF.</p>"}'

Available templates

invoice, receipt, report, letter, certificate (landscape), contract, proposal, resume, meeting-notes, packing-slip

NameTypeRequiredDefaultDescription
htmlstringNoRaw HTML content (use this OR template)
templatestringNoTemplate name
dataobjectNoData for template rendering
formatstringNoA4A4, Letter, A3, A5, Legal
landscapebooleanNofalseLandscape orientation
marginobjectNo{ top, right, bottom, left } in mm e.g. "20mm"

QR Codes

Generate QR codes with custom colors, sizes, and formats.

GET/qrURL mode
POST/api/v1/qrAPI mode

URL Mode

html
<img src="https://usesnapforge.com/qr?text=https://example.com&size=300&fg=8B5CF6&bg=ffffff" />

API Mode

curl
curl -X POST https://usesnapforge.com/api/v1/qr \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"https://example.com","size":300,"format":"svg"}'
python
import requests
r = requests.post("https://usesnapforge.com/api/v1/qr",
    headers={"Authorization": "Bearer sk_live_YOUR_KEY"},
    json={"text": "https://example.com", "size": 300, "fg": "8B5CF6"})
with open("qr.png", "wb") as f:
    f.write(r.content)
go
req, _ := http.NewRequest("POST", "https://usesnapforge.com/api/v1/qr",
    strings.NewReader(`{"text":"https://example.com","size":300}`))
req.Header.Set("Authorization", "Bearer sk_live_YOUR_KEY")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
NameTypeRequiredDefaultDescription
textstringYesText or URL to encode (max 4000 chars)
sizenumberNo300Image size in pixels (50-2000)
fgstringNo000000Foreground color (6-digit hex)
bgstringNoffffffBackground color (6-digit hex)
formatstringNopng"png" or "svg"
errorCorrectionstringNoM"L", "M", "Q", or "H"

URL Metadata

Extract title, description, image, favicon, and more from any URL.

GET/meta?url=...URL mode
GET/api/v1/metadata?url=...API mode
curl
curl "https://usesnapforge.com/meta?url=https://github.com"

Response format

json
{
  "success": true,
  "data": {
    "title": "GitHub",
    "description": "Let's build from here",
    "image": "https://github.githubassets.com/images/...",
    "favicon": "https://github.com/favicon.ico",
    "siteName": "GitHub",
    "type": "website",
    "locale": "en_US",
    "url": "https://github.com",
    "author": null,
    "published": null
  }
}
NameTypeRequiredDefaultDescription
urlstringYesURL to extract metadata from (must be http/https)

Limitations: 5-second timeout, max 5 redirects. file://, localhost, and private IPs are blocked for security.

Image Resize

Resize, convert, and optimize images on the fly.

GET/resize?url=...&w=400URL mode
POST/api/v1/resizeAPI mode
html
<img src="https://usesnapforge.com/resize?url=https://example.com/photo.jpg&w=400&h=300&format=webp" />
NameTypeRequiredDefaultDescription
urlstringYesSource image URL
w / widthnumberNoTarget width (1-5000)
h / heightnumberNoTarget height (1-5000)
formatstringNopngjpeg, png, webp, avif
qualitynumberNo80Output quality (1-100)
fitstringNocovercover, contain, fill, inside, outside
grayscalebooleanNofalseConvert to grayscale
blurnumberNo0Blur amount (0-100)

Placeholders

Generate placeholder images via URL. No auth, no rate limit (SVG is cheap).

GET/placeholder/:WxH/:bgColor?/:textColor?URL mode only
html
<img src="https://usesnapforge.com/placeholder/600x400" />
<img src="https://usesnapforge.com/placeholder/800x600/8B5CF6/ffffff?text=Banner" />
<img src="https://usesnapforge.com/placeholder/1200x630/0F172A/F8FAFC?text=OG+Image&font=serif" />
NameTypeRequiredDefaultDescription
dimensionsstringYesFormat: "WIDTHxHEIGHT" e.g. "600x400"
bgColorstringNoccccccBackground hex color
textColorstringNo666666Text hex color
textstringNoCustom text (default: "WxH")
fontstringNosans-serif"sans-serif" or "serif"

URL Mode vs API Mode

URL ModeAPI Mode
AuthenticationNot requiredAPI key required
SignupNot requiredFree account needed
WatermarkYes (on free)No (on paid plans)
FeaturesOG, QR, Meta, Resize, PlaceholderAll 6 features + PDF
ParametersQuery stringJSON body (full control)
Best forStatic sites, no-code, prototypesWeb apps, SaaS, automation
Rate limit100/day per IPBased on plan (1K-500K/month)

Error handling

All errors return a consistent JSON format:

json
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request parameters",
    "details": [{ "path": "title", "message": "Required" }]
  }
}

HTTP status codes

CodeMeaningWhen
400Bad RequestInvalid parameters, missing required fields
401UnauthorizedMissing or invalid API key / JWT
403ForbiddenAccess denied to resource
404Not FoundTemplate or route not found
429Too Many RequestsRate limit or plan limit exceeded
500Internal ErrorServer error (never includes stack traces)
503Service UnavailableServer busy (Puppeteer queue full)

Rate limits

PlanMonthly limitPer-minute burst
Free1,000 requests30 req/min
Starter20,000 requests120 req/min
Pro100,000 requests300 req/min
Business500,000 requests600 req/min

URL mode (no auth): 100 requests per day per IP address.

When you exceed your limit, the API returns 429 Too Many Requests with a Retry-After header. Your limit resets on the 1st of each month.

Need help? Email support@usesnapforge.com