OGP Generator
OGP Generator

Quick Start

Getting Started with OGP Generator

Set up your API key, generate your first Open Graph image, and integrate it into your app in a few minutes.

Step 1

Create your API key

Start with a free account. Your API key is created instantly after signup.

Get API Key

Step 2

Generate your first image

Call the API endpoint directly with title, description, and theme.

curl "https://api.ogp-api.com/api/og?title=Launch+Week&description=Ready+to+ship&theme=dark" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o social-card.png

Step 3

Integration Examples

Next.js

Use the generated URL in metadata and share links from your pages.

const response = await fetch("https://api.ogp-api.com/api/og?title=Product+Update&description=Now+shipping&theme=gradient", { headers: { Authorization: "Bearer YOUR_API_KEY" }, });

Astro

Generate cards for content pages and attach the image in frontmatter metadata.

const response = await fetch("https://api.ogp-api.com/api/og?title=New+Article&description=Published+today&theme=dark", { headers: { Authorization: "Bearer YOUR_API_KEY" }, });

Any backend

Call the endpoint from server jobs or CMS webhooks to prebuild campaign visuals.

curl "https://api.ogp-api.com/api/og?title=Weekly+Digest&description=Auto+generated&theme=minimal" -H "Authorization: Bearer YOUR_API_KEY" -o ogp.png

Use the visual editor for faster iteration

Prefer a UI-first workflow? Open the live generator to preview themes, copy API URLs, and download PNG output.

Open Generator