OG / social image

OG Image API

Generate Open Graph and social share images on the fly — render your own HTML template into a 1200×630 card, or screenshot a live URL so every page gets a preview. One API call, real browser, your CSS.

Two ways to make a card. Host an HTML template with the title/author templated in and capture it at 1200×630 — you own the design in real CSS. Or point /v1/screenshot at a live URL to give pages with no og:image a share picture anyway. Same endpoint, same price.

Try it

request — HTML template to a 1200x630 card
curl "https://api.rasterly.dev/v1/screenshot?url=https://yoursite.com/og/post-123&width=1200&height=630&scale=2" \
  -H "X-Api-Key: sk_live_..." --output og.png

Point the URL at your own template route (with the post's title, cover and author merged in), or at any live page. scale=2 gives a retina-crisp card; format=jpeg + quality shrinks the file.

Why rasterly

Template-image tools render their own layout format; rasterly renders your HTML in a real browser, so gradients, web fonts and any CSS you can write come out pixel-exact — and it can screenshot a live URL too. It's the same one engine behind screenshot, PDF, read, extract and monitoring, so one key covers your whole web layer, at $0.90 per 1,000 with 100/mo free.

FAQ

How do I generate an OG image from HTML?
Design your card as an HTML route (title/author templated in), then capture it at width=1200&height=630. Real browser, so CSS, web fonts and gradients render exactly.
Can I make one from a live URL instead?
Yes — pass any URL to /v1/screenshot at 1200×630, so every page gets a share image even with no og:image. Great for directories and link-in-bio tools.
What size should a social card be?
1200×630 is standard for Open Graph and Twitter/X. Set width=1200&height=630 (add scale=2 for retina), format=png or jpeg.
How is this different from Bannerbear/Placid?
Those render their own template format. rasterly renders any HTML you host (you own the design in real CSS) and can screenshot live URLs — plus read, extract, PDF and monitoring on one key, priced on cost.
Start free — 100 renders Try the live demo