GUIDE · UPDATED OCT 2026

OG Image API: social cards as an API call

Every link you share renders a preview card — and a designed card gets dramatically more clicks than a blank one. An OG image API generates those 1200×630 cards programmatically: POST your title and subtitle, get back a PNG.

Why not just design them in Figma?

You should — once, for your homepage. But your blog has 40 posts, your changelog ships weekly, and your docs have 200 pages. Nobody is hand-designing cards for all of those. The API approach: pick a template once, then generate per-page cards automatically at build or publish time.

How it works

curl -X POST https://shotsapi.com/v1/og/launch \
  -H "Authorization: Bearer $SHOTS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"We just launched Shots","subtitle":"Screenshots & OG images via API"}' \
  --output og.png

Response: a 1200×630 PNG, ready to reference in your <meta property="og:image"> tag.

Dynamic cards at build time

The real power move: generate a unique card per page in your static site build.

// In your build script — one card per blog post
for (const post of posts) {
  const res = await fetch("https://shotsapi.com/v1/og/blog", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.SHOTS_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ title: post.title, subtitle: post.excerpt }),
  });
  await Bun.write(`public/og/${post.slug}.png`, res);
}

Then in your HTML head: <meta property="og:image" content="https://yoursite.com/og/my-post.png">.

12 templates, zero design skills

Shots ships 12 hand-designed templates — launch announcements, blog posts, changelogs, docs pages, quotes, stats, and more. Each takes simple JSON fields (title, subtitle, tag, avatar). Browse the template gallery →

OG image checklist

Try it free

Shots is free while in beta. Render any template with your own text in the live demo — no signup.

Every page deserves a card.

Free during beta · 12 templates · one POST per image.

Browse templates API quickstart