OG Image API

OG Image API is a hosted REST API that turns a title into a 1200×630 PNG Open Graph image with one GET request, so you can put the URL straight into an og:image tag. It renders server-side with no headless browser.

Example OG image: dark theme card titled 'Ship faster with dynamic social cards'

Get an API key

Quick start

Call GET /v1/og with a title. The response is an image/png, 1200×630.

curl "https://og-image-api1.p.rapidapi.com/v1/og?title=My%20Post&theme=dark" \
  -H "X-RapidAPI-Key: YOUR_KEY" -H "X-RapidAPI-Host: og-image-api1.p.rapidapi.com" -o card.png

In a page, set the image URL as the share image:

<meta property="og:image" content="https://your-site.com/og?title=My%20Post">

Keep your RapidAPI key server-side: proxy the call through your own route (as above) or render once at build time and store the PNG.

Parameters

NameRequiredWhat it does
titleyesHeadline, up to 300 characters; wraps to 3 lines
subtitlenoSecond line, up to 300 characters; wraps to 2 lines
themenodark, light, mint (default dark)
badgenoSmall pill above the title, e.g. NEW or GUIDE (24 characters)
footernoBottom-left text such as your domain (80 characters)

GET /v1/themes lists the themes. Full schema: openapi.json.

Pricing

PlanPriceImagesOver the limit
BASIC (RapidAPI)Free100 / monthHard limit
PRO (RapidAPI)$9 / month10,000 / month$0.002 per image
ULTRA (RapidAPI)$29 / month50,000 / month$0.001 per image
MEGA (RapidAPI)$79 / month250,000 / month$0.0005 per image
Apify ActorPay per resultAny$0.002 per image

How it compares

OptionHow it worksBest when
OG Image APIHosted; one GET returns a PNG; text-based themesYou want clean title cards with nothing to host, at the lowest cost
Vercel OG (@vercel/og)Library; you write JSX and host the functionYou deploy on Vercel and want full layout control
Bannerbear, PlacidHosted; visual template editor; images and photosYou need designed templates with photos and a GUI
Puppeteer / Playwright screenshotsSelf-hosted headless Chrome renders HTMLYou need arbitrary HTML and can run Chrome

Frequently asked questions

What is the easiest way to generate Open Graph images for a blog?

Point each page's og:image tag at a URL that renders the image on request. With OG Image API that is one GET request with the post title as a query parameter; it returns a 1200×630 PNG, so there is no build step, no design tool and no headless browser.

How do I create OG images without Puppeteer or headless Chrome?

Use a renderer that draws the image directly instead of screenshotting HTML. OG Image API draws text and themes server-side, so a call returns a PNG in milliseconds once warm and you have no Chrome to install, patch or scale.

What size should an Open Graph image be?

1200×630 pixels (a 1.91:1 ratio). That is what X (Twitter) large cards, LinkedIn, Facebook, Slack and Discord use for link previews, and it is the only size OG Image API returns.

How much does OG Image API cost?

On RapidAPI: free for 100 images a month, then $9 for 10,000, $29 for 50,000 and $79 for 250,000 a month. On Apify it is pay per result at $0.002 per image ($2 per 1,000).

Is OG Image API a good alternative to Bannerbear, Placid or Vercel OG?

It suits you if you only need clean text-based share cards and want the cheapest hosted option with nothing to run. Choose Bannerbear or Placid for drag-and-drop templates with photos, or Vercel OG (@vercel/og) if you are on Vercel and happy to write JSX and host it yourself.

Can I generate OG images in bulk for an existing site?

Yes. The Apify Actor takes a list of titles and returns one PNG per title with a public URL, charged per image; blank titles are skipped and not charged.

Does it store my data?

No account data or text is stored. Rendered images are kept in memory for up to 24 hours so repeat crawler hits on the same URL are served from cache.

How fast is it?

A warm call renders in well under a second. The service scales to zero when idle, so the first call after a quiet period takes about 3 seconds to wake it.

Last updated 2026-10-22. Machine-readable summary: llms.txt.