Generate social images and OG cards from professional templates via the SnapOG API. One API call = one pixel-perfect PNG.
Generate OG images, social cards, and marketing visuals from professionally designed templates. Returns pixel-perfect PNGs in under 100ms.
API Base: https://api.snapog.dev
All generation requests require a Bearer token. The API key is read from the SNAPOG_API_KEY environment variable.
Authorization: Bearer $SNAPOG_API_KEY
Preview and template listing endpoints work without authentication.
| Template | ID | Best For |
|---|---|---|
| Blog Post | blog-post | Blog articles, tutorials, documentation |
| Announcement |
announcement |
| Product launches, updates, releases |
| Stats Card | stats | Metrics dashboards, quarterly results |
| Quote | quote | Testimonials, pull quotes, social shares |
| Product Card | product | SaaS products, pricing, features |
| GitHub Repo | github-repo | Open source projects, repo cards |
| Event | event | Conferences, meetups, webinars |
| Changelog | changelog | Release notes, version updates |
| Brand Card | brand-card | Company pages, docs, marketing |
| Photo Hero | photo-hero | Blog headers, news, portfolios |
curl https://api.snapog.dev/v1/templates
Returns all templates with their paramSchema (parameter names, types, required fields, defaults). Always call this first if the user hasn't specified a template.
Use this for downloading images or advanced options:
curl -X POST https://api.snapog.dev/v1/generate \
-H "Authorization: Bearer $SNAPOG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"template": "blog-post",
"params": {
"title": "Building with MCP",
"author": "Taylor",
"tags": ["AI", "Tools"],
"accentColor": "#6366f1"
}
}' \
--output og-image.png
POST body fields:
template (string, required) — template IDparams (object, required) — template parameterswidth (number) — image width in pixels (default: 1200)height (number) — image height in pixels (default: 630)format ("png" | "svg" | "pdf") — output format (default: png)fontFamily (string) — any Google Font family namewebhook_url (string) — URL to POST when generation completesSave the response body directly to a .png file. The response Content-Type is image/png.
Use this when the user needs a URL to embed in HTML meta tags, markdown, or anywhere an image URL is needed: