API · PNG cards

OG Image Gen

Generate an Open Graph image from a template and a few lines of text.

API reference
Template
Theme
Size

1200 × 630

Generated Open Graph card

API reference

Stateless. No account, no uploads, no upstream fetches. title is required. Other fields fall back to template=card, theme=ink, size=og.

Endpoints

MethodPathReturns
GET/api/healthService status JSON
GET/api/templatesTemplates, themes, sizes, limits
GET/api/openapi.jsonOpenAPI 3.1 document
POST/api/renderJSON with png_base64 or svg
GET/api/og.pngimage/png
GET/api/og.svgimage/svg+xml

Fields

FieldLimitNotes
title140Required. Newlines start a new line.
subtitle200Caption, attribution, or stat label.
eyebrow48Shown in uppercase. Ticket stub stays “ADMIT ONE”.
footer80Small line at the bottom. Optional.
templatecard, split, quote, stat, ticket
themeink, paper, signal, dawn
sizeog 1200×630, square 1200×1200, story 1080×1920
formatPOST only: png (default) or svg

Templates

card
Full-bleed title card with an eyebrow, subtitle, and footer.
split
Accent panel on the left, title on the right.
quote
Large quotation with an attribution line.
stat
One big figure and a short caption.
ticket
Perforated pass with a stub and a serial number.

Examples

curl -fsSL -o card.png \
  'https://og-image-gen.over9000.cc/api/og.png?template=card&theme=ink&title=Generate%20the%20card%20before%20the%20post.'
curl -s https://og-image-gen.over9000.cc/api/render \
  -H 'content-type: application/json' \
  -d '{"template":"quote","theme":"paper","title":"Ship the door.","subtitle":"over9000"}'

Errors

StatusCodeWhen
400invalid_requestMissing title, bad enum, or a field over its limit
400invalid_jsonPOST body is not JSON
404not_foundUnknown /api path
405method_not_allowedWrong verb for the path
413payload_too_largeJSON body over 32KB
415unsupported_media_typePOST without application/json
500render_failedThe card could not be drawn

The typeface on the card is Card Sans, a static Latin subset of IBM Plex Sans, renamed under the SIL Open Font License. The font covers Latin-1 and common punctuation. Characters outside that set may show as a missing-glyph box.