GET /api/ogtitlestringrequiredMain title text (required)
descriptionstringSubtitle or description text
templatestringTemplate style: default, minimal, branded, blog, product, social, gradient
Default: default
themestringColor theme: dark, light, black, navy, warm
Default: dark
brandstringBrand name to display
accentstringAccent color in hex format
Default: #6366f1
authorstringAuthor name (for blog/social templates)
tagstringCategory tag (for blog template)
datestringDate string (for blog template)
emojistringEmoji to display (for product template)
Default: 🚀
fromstringGradient start color (for gradient template)
Default: #667eea
tostringGradient end color (for gradient template)
Default: #764ba2
defaultClean layout with title, description, and optional brandminimalCentered title with optional descriptionbrandedBrand header with accent bar at bottomblogBlog post style with tag, author, and dateproductProduct announcement with emoji blocksocialQuote/tweet style with authorgradientFull gradient backgroundGET /api/og?title=Hello%20World
GET /api/og?title=10%20Tips%20for%20Better%20Code&template=blog&tag=Tutorial&author=Crystal&date=Feb%202026
GET /api/og?title=Introducing%20OGPix&description=Beautiful%20social%20images&template=product&brand=OGPix&emoji=✨
GET /api/og?title=Build%20Something%20Amazing&template=gradient&from=%23f97316&to=%23ec4899
<meta property="og:image" content="https://ogpix.io/api/og?title=My%20Page%20Title" /> <meta property="og:image:width" content="1200" /> <meta property="og:image:height" content="630" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:image" content="https://ogpix.io/api/og?title=My%20Page%20Title" />
// app/blog/[slug]/page.tsx
export async function generateMetadata({ params }) {
const post = await getPost(params.slug);
return {
openGraph: {
images: [`https://ogpix.io/api/og?title=${encodeURIComponent(post.title)}&template=blog`],
},
};
}curl -o image.png "https://ogpix.io/api/og?title=Hello%20World&theme=dark"
const params = new URLSearchParams({
title: 'My Amazing Post',
description: 'A great description',
template: 'branded',
brand: 'My Site',
});
const imageUrl = `https://ogpix.io/api/og?${params}`;import urllib.parse
import requests
params = {
'title': 'My Amazing Post',
'template': 'blog',
'author': 'Crystal',
}
url = f"https://ogpix.io/api/og?{urllib.parse.urlencode(params)}"
response = requests.get(url)
with open('og-image.png', 'wb') as f:
f.write(response.content)Returns a PNG image with the following properties:
Built with ❤️ by Crystal • © 2026