Build a URL, get a PNG. That's the entire API.
https://api.opengraphapi.com/v1/card?template=blog-og&title=Hello+World&subtitle=My+first+card&bg=sunset
Open it in a browser — that's your image. Use it anywhere an image URL works:
<meta property="og:image" content="https://api.opengraphapi.com/v1/card?template=blog-og&title=${encodeURIComponent(post.title)}">
| Parameter | Description | Example |
|---|---|---|
template | One of the 30 templates (see below). Default blog-og. | template=certificate |
title | Main text (required for most templates) | title=Jane+Doe |
subtitle | Secondary line (meaning varies per template) | subtitle=SEO+Masterclass |
meta | Tertiary field: date / episode / handle / stars | meta=Sep+2026 |
brand | Brand or issuer name shown in the header | brand=Acme |
price / badge | Used by product / announcement | price=$49 |
bg | Theme: midnight, sunset, forest, royal, slate, ocean, mono, rose, amber, paper | bg=royal |
image | Product photo URL (jpg/png/webp, ≤4MB) — used by the product template | image=https://…/p.jpg |
api_key | Raises quota; watermark stays on the free plan only | api_key=og_xxx |
Machine-readable list: GET /v1/templates
| Template | Best for |
|---|---|
blog-og | Article / blog share cards |
quote | Social quotes, testimonials |
announcement | Product launches, release notes |
product | E-commerce listings with price tag |
certificate | Course completion, awards (per-user URLs) |
event | Meetups, webinars, conferences |
podcast | Episode art with guest + episode no. |
stat | Big-number marketing stats |
changelog | Version releases |
youtube | Video thumbnails / tutorials |
tweet | Tweet-style quote cards |
article | Minimal editorial (light theme) |
newsletter | Issue covers |
job | Hiring cards |
github | Repo share cards |
testimonial | Testimonial with star row |
price-drop | Sale card with old price struck |
producthunt | PH launch card with upvotes |
hackernews | HN front-page story card |
discord | Server announcement banner |
review | Review score card |
countdown | Urgency countdown |
realestate | Property listing |
webinar | Webinar promo |
course | Course lesson progress |
linkedin | LinkedIn post card |
code | Code snippet card |
comparison | A vs B comparison |
faq | Q |
github | Repo share cards |
milestone | Achievement card |
Without a key you get 300 images/day per IP with a small watermark. Your own key from /start/ is free too — magic link, about 60 seconds, no card, and the 300/day is counted per key instead of per shared IP. Need more? Starter $19/mo (500/day) and Growth $49/mo (3,000/day) guarantee watermark-free renders, private caching and email support. Self-serve checkout is live.
Responses include an x-ratelimit-remaining header. When the daily quota is exhausted the API returns HTTP 429 until the next UTC day.
# cURL — save a certificate
curl -o cert.png "https://api.opengraphapi.com/v1/card?template=certificate&title=Jane+Doe&subtitle=SEO+Course&api_key=YOUR_KEY"
# JavaScript — dynamic OG image in Next.js / Astro
export function ogImageUrl(title: string) {
const u = new URL("https://api.opengraphapi.com/v1/card");
u.searchParams.set("template", "blog-og");
u.searchParams.set("title", title);
u.searchParams.set("api_key", process.env.OG_API_KEY!);
return u.toString();
}
# Python — batch product images
import requests, urllib.parse
for name, price in products:
url = "https://api.opengraphapi.com/v1/card?" + urllib.parse.urlencode(
{"template": "product", "title": name, "price": price, "api_key": KEY})
open(f"{name}.png", "wb").write(requests.get(url).content)