ogify
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

FieldTypeRequiredNotes
templatestringYesOne of blog, product, saas.
titlestringYesMain headline rendered on the image.
subtitlestringNoSupporting text under the title.
brandstringNoBrand label shown on supported templates.
imageUrlstringNoRemote 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.png

Example 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" }