API reference
/render/template
Generate a PNG from one of Ogify's built-in templates.
HTTP request
POST https://api.ogify.dev/render/template Content-Type: application/json x-api-key: $OGIFY_KEY
Request body schema
| Field | Type | Required | Notes |
|---|---|---|---|
| template | string | Yes | One of blog, product, saas. |
| title | string | Yes | Main headline rendered on the image. |
| subtitle | string | No | Supporting text under the title. |
| brand | string | No | Brand label shown on supported templates. |
| imageUrl | string | No | Remote image used by templates that support artwork. |
Example request
curl -X POST https://api.ogify.dev/render/template \
-H "x-api-key: $OGIFY_KEY" \
-H "Content-Type: application/json" \
-d '{
"template": "blog",
"title": "How we launched Ogify",
"subtitle": "A tiny API for social cards",
"brand": "Ogify"
}' \
--output og.pngExample response
HTTP/1.1 200 OK Content-Type: image/png Cache-Control: public, max-age=31536000, immutable ETag: "ogify-template-abc123" <PNG binary>
Error responses
401 Unauthorized
{ "error": "Missing or invalid API key" }
403 Forbidden
{ "error": "Template not available on your plan" }
429 Too Many Requests
{ "error": "Rate limit exceeded" }