OG Image Generator API

Dynamic Open Graph / social preview image generator. Returns SVG images from parameters.

Endpoints

GET /og-image/api/generate?title=Hello+World
POST /og-image/api/generate — JSON body
GET /og-image/api/themes
GET /og-image/api/health

Parameters

NameTypeDefaultDescription
titlestring—Main title (required, max 100)
subtitlestring—Subtitle text (max 150)
themestringdarkdark, light, gradient, minimal, neon
widthint1200Image width (200–4096)
heightint630Image height (200–4096)
bgColorhexthemeBackground color
textColorhexthemeTitle text color
accentColorhexthemeAccent / border color
fontSizeint48Title font size (12–200)
fontFamilystringsystem-uiFont family stack
logostring—Text/emoji logo (max 10)
patternstringnonenone, dots, grid, waves, diagonal
borderbooltrueShow accent left border
watermarkstring—Bottom-right watermark (max 30)

Quick Example

curl "https://api.lazy-mac.com/og-image/api/generate?title=Hello+World&theme=neon&pattern=dots"
curl -X POST https://api.lazy-mac.com/og-image/api/generate \
  -H "Content-Type: application/json" \
  -d '{"title":"My Post","subtitle":"A great subtitle","theme":"gradient","pattern":"waves"}'