API

A single GET endpoint. Hit a URL, get a 1200×630 PNG. CDN-cached forever per unique param combination.

Endpoint

GET https://og.labs.basenull.com/api/og?template=<name>&…params

Templates

  • editorialtitle, kicker?, site? · serif blog post layout
  • producttitle, tagline?, site? · launch tile
  • quotequote, author? · pull quote
  • statstat, label, context?, site? · big-number announcement
  • updatetitle, bullets?, version?, site? · changelog tile
  • minimaltitle, site? · centered title

Style params

  • ?accent=2563EB — any 3 or 6 digit hex (with or without #). Defaults per template.
  • ?theme=light|dark — defaults to light.
  • ?key=ogpk_… — Pro API key removes the watermark and enables custom logos.
  • ?logo=https://… — Pro only. Server-fetched once, cached. https only, public hosts.

Caching

Every unique URL is cached as an immutable PNG (Cache-Control: public, max-age=31536000, immutable). Repeated fetches by Twitter / Facebook / Slack scrapers do not re-render — they hit the CDN. Cache-miss renders are rate-limited (60 / min anonymous, 1000 / min Pro).

Drop into your <head>

<meta property="og:image"
  content="https://og.labs.basenull.com/api/og?template=editorial&title=Hello&site=acme.com">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image"
  content="https://og.labs.basenull.com/api/og?template=editorial&title=Hello&site=acme.com">

Errors

  • 400 — invalid template or missing required param
  • 429 — rate limit (Retry-After header)
  • 500 — render failure (rare)