Templates
GET
/v1/templatesReturns available OG image templates. No authentication required.
Response
{
"templates": [
{
"id": "blog-post",
"name": "Blog Post",
"description": "Clean blog post social card",
"variables": ["title", "author", "date", "avatar_url", "reading_time", "tag", "bg_color"]
},
{
"id": "social-card",
"name": "Social Card",
"description": "Generic social media card",
"variables": ["title", "description", "logo_url", "site_name", "bg_color"]
}
]
}Using templates
Pass a template id to the OG Image endpoint:
curl -X POST "https://api.snapsharp.dev/v1/og-image" \
-H "Authorization: Bearer sk_live_..." \
-d '{"template":"blog-post","data":{"title":"My Post","author":"You"}}'Template variables
All template variables are optional strings. Omit any you don't need — the template handles missing values gracefully.
The bg_color variable accepts any CSS color value: #1a1a2e, rgb(26,26,46), hsl(240,30%,14%).
Browse all templates with live previews at snapsharp.dev/templates.
Custom templates
Need your own design? Create custom OG image templates with full HTML/CSS control using the template editor (Growth+ plan).
Your custom templates appear alongside built-in templates in the API response and can be used with the same OG Image endpoint.