Free OG Image Generator: Create Social Media Images with API
Generate beautiful Open Graph images for Twitter, Facebook, and LinkedIn with our free tool and API. 10 templates, custom fonts, no design skills needed.
What is an OG Image?
Open Graph (OG) images are the preview images that appear when you share a link on social media platforms like Twitter, Facebook, LinkedIn, and Slack. A compelling OG image can dramatically increase click-through rates — studies show links with custom OG images get up to 2x more engagement.
The standard OG image size is 1200 x 630 pixels, which displays well across all major platforms.
Free OG Image Generator Tool
We've built a free OG image generator that lets you create professional social media images in seconds. No design skills required!
Features:
- 10 professionally designed templates
- 5 font families (Inter, Roboto, Playfair, Mono, Serif)
- 8 gradient presets + custom colors
- Badge/ribbon support for announcements
- Author attribution for blog posts
- Stats display for metrics
- PNG, JPEG, and WebP output
The free tier includes 10 images per day with a small watermark. For unlimited, watermark-free images, use the API.
OG Image API
For developers and automation, we offer a powerful API endpoint:
curl -X POST https://shotapi.net/v1/og-image \
-H "X-API-Key: sk_your_key" \
-H "Content-Type: application/json" \
-d '{
"title": "How to Build Amazing APIs",
"subtitle": "A complete guide for developers",
"template": "gradient-dark",
"brand": "MyBlog",
"accent_color": "#6366f1"
}' --output og-image.png
Available Templates
| Template | Best For |
|---|---|
gradient-dark | Tech blogs, SaaS products |
gradient-light | Clean, professional content |
minimal | Typography-focused headlines |
blog | Blog posts with author info |
product | Product launches, features |
announcement | News, updates, events |
quote | Testimonials, quotes |
stats | Metrics, achievements |
newsletter | Email newsletters |
social | Social media profiles |
Automation Examples
Node.js
import { ShotAPI } from 'shotapi-sdk';
const client = new ShotAPI({ apiKey: 'sk_your_key' });
// Generate OG image for a blog post
const image = await client.ogImage({
title: post.title,
subtitle: post.excerpt,
template: 'blog',
author: post.author.name,
author_avatar: post.author.avatar,
brand: 'MyBlog'
});
// Save to file or upload to CDN
fs.writeFileSync(`og-${post.slug}.png`, image);
Python
from shotapi import ShotAPI
client = ShotAPI("sk_your_key")
# Generate OG image
image = client.og_image(
title="My Amazing Post",
subtitle="Learn something new today",
template="gradient-dark",
brand="MyBrand"
)
# Save to file
with open("og-image.png", "wb") as f:
f.write(image)
Integration with Static Site Generators
You can automatically generate OG images during your build process:
Next.js (build script)
// scripts/generate-og-images.js
const posts = await getAllPosts();
for (const post of posts) {
const response = await fetch('https://shotapi.net/v1/og-image', {
method: 'POST',
headers: {
'X-API-Key': process.env.SHOTAPI_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: post.title,
subtitle: post.description,
template: 'blog',
brand: 'My Blog'
})
});
const buffer = await response.arrayBuffer();
fs.writeFileSync(`public/og/${post.slug}.png`, Buffer.from(buffer));
}
Best Practices
- Keep titles short: 60 characters max for best display
- Use high-contrast colors: Ensure text is readable
- Include branding: Add your logo or brand name
- Test across platforms: Preview on Twitter, Facebook, LinkedIn
- Cache images: Store generated images on CDN for performance
Pricing
| Tier | Limit | Watermark | Price |
|---|---|---|---|
| Free (no API key) | 10/day | Yes | $0 |
| Free Plan | 100/month | No | $0 |
| Pro Plan | 5,000/month | No | $29/mo |
| Max Plan | 25,000/month | No | $79/mo |
Try the free OG Image Generator or view pricing for API access.