Generate beautiful Open Graph images programmatically with a simple API call. Perfect for blogs, social media, and dynamic content.
Sign up and create an API key from your dashboard.
curl "https://ogforge.io/api/og-image?api_key=YOUR_API_KEY&template=blog-post&title=Hello+World"
<meta property="og:image" content="https://ogforge.io/api/og-image?api_key=YOUR_API_KEY&template=blog-post&title=My+Article" />
Generate an Open Graph image with customizable templates and parameters.
https://ogforge.ioInclude your API key as a query parameter:
?api_key=YOUR_API_KEY| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your API authentication key |
| template | string | Yes | Template name (see templates section) |
| format | string | No | Image format: png, jpeg, webp (default: png) |
| theme | string | No | Theme: light or dark (default: dark) |
| gradient | string | No | Gradient style: radial, linear, sunset, ocean, forest, purple, midnight, aurora, fire, candy |
| font | string | No | Font family: inter, roboto, poppins, montserrat, playfair, merriweather, lato, oswald, raleway, nunito, ubuntu, rubik, work-sans, dm-sans, space-grotesk |
| backgroundColor | string | No | Background color or gradient. Accepts: hex color (e.g., 1a1a2e), gradient preset (sunset, ocean, etc.), or custom gradient (linear:#ff5733,#3366ff) |
| preset | string | No | Style preset: modern, minimal, bold, elegant, playful, tech, corporate |
OGForge provides 36 customization parameters plus 7 style presets for complete control over your OG images. Use presets for quick styling, or customize every aspect with granular parameters.
Quick-start styles that configure multiple parameters at once:
modernminimalboldelegantplayfultechcorporateExample: ?preset=modern&pattern=grid
| Parameter | Type | Description |
|---|---|---|
| titleSize | number | Title font size in pixels (20-120, default: 56) |
| titleWeight | string | Font weight (400-900, default: 700) |
| titleAlign | string | Text alignment: left, center, right |
| titleLetterSpacing | string | Letter spacing (e.g., 0.05em, -0.02em) |
| titleMaxLines | number | Max lines before truncation (1-5, default: 3) |
| + subtitleSize, subtitleWeight, metaSize and more... | ||
| Parameter | Type | Description |
|---|---|---|
| paddingX | number | Horizontal padding in pixels (20-200, default: 60) |
| paddingY | number | Vertical padding in pixels (20-200, default: 60) |
| contentGap | number | Gap between elements (0-100, default: 32) |
| + contentAlign, horizontalAlign, accentBarWidth, accentBarHeight | ||
| Parameter | Type | Description |
|---|---|---|
| borderRadius | number | Border radius for elements (0-50, default: 0) |
| textShadow | string | CSS text-shadow (e.g., 2px 2px 4px rgba(0,0,0,0.5)) |
| glowIntensity | number | Glow intensity for text (0-100) |
| + boxShadow, overlayColor, overlayOpacity, glowColor, etc. | ||
| Parameter | Type | Description |
|---|---|---|
| backgroundImage | string | URL to background image |
| backgroundBlur | number | Blur amount in pixels (0-20) |
| pattern | string | Pattern: dots, grid, diagonal-lines, waves, noise, hexagons |
| patternOpacity | number | Pattern opacity (0.0-1.0, default: 0.1) |
| + backgroundSize, backgroundPosition, backgroundOpacity, patternColor | ||
?preset=modern&titleSize=72&pattern=grid&borderRadius=16&glowIntensity=30For complete documentation with 50+ examples, see the Customization Guide
Perfect for blog articles
Parameters:
titleauthorauthorImagelogoGeneral social media sharing
Parameters:
titledescriptionimagesiteNameNews articles and posts
Parameters:
titlecategoryreadingTimeauthordateInspirational quotes
Parameters:
quoteauthorauthorTitleProduct announcements
Parameters:
titlesubtitledateCustomer testimonials
Parameters:
quoteauthorcompanyratingTechnical documentation
Parameters:
titlesectionversionPodcast episodes
Parameters:
titleepisodehostsdurationYouTube videos
Parameters:
titlechannelviewsdurationProduct showcases
Parameters:
namepriceratingreviewsEvents and webinars
Parameters:
titledatelocationtimeNewsletter editions
Parameters:
titleissuedatecurl "https://ogforge.io/api/og-image?api_key=YOUR_API_KEY&template=blog-post&title=10+Best+Practices+for+API+Design&author=Jane+Smith&theme=dark"curl "https://ogforge.io/api/og-image?api_key=YOUR_API_KEY&template=social-card&title=Introducing+OGForge&description=Generate+beautiful+OG+images+instantly&siteName=OGForge"API requests are rate-limited to ensure fair usage and system stability.
Rate Limit Headers: Check the X-RateLimit-Remaining header in responses to track your usage.
Invalid parameters or missing required fields.
{
"error": "Validation failed",
"details": [
{
"field": "template",
"message": "Invalid template name"
}
]
}Invalid or missing API key.
{
"error": "Invalid API key"
}Rate limit exceeded.
{
"error": "Too many image generation requests",
"retryAfter": 45
}Monthly limit exceeded. Upgrade your plan.
{
"error": "Monthly limit exceeded",
"limit": 50,
"used": 50
}