OG Image Generator API
Generate social preview images with a single URL. No API key needed.
Quick Start
Build a URL with your parameters and use it directly in HTML:
<meta property="og:image"
content="https://[your-domain]/api/og?title=My+Blog+Post&template=gradient" />Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
| title | Yes | — | Main title text (max 80 chars) |
| subtitle | No | — | Subtitle text (max 120 chars) |
| template | No | gradient | gradient, bold, minimal, split, dark |
| color | No | #ff6b35 | Hex color for brand accent |
| logo | No | — | HTTPS URL to your logo (PNG/SVG, max 500KB) |
Examples
# Basic
/api/og?title=Hello+World
# Custom template and color
/api/og?title=Launch+Day&template=bold&color=%2339d2c0
# With subtitle and logo
/api/og?title=My+Company&subtitle=We+build+things&logo=https://example.com/logo.pngRate Limits
100 requests per month per IP address (free tier).
Cache hits don't count — identical parameter combinations are served from edge cache without consuming your quota.
Need more? Pro plan with unlimited API is coming soon.
Response
- Content-Type:
image/png - Dimensions: 1200×630 pixels
- Cache: Identical parameters return instantly from edge cache
- Errors: 400 (missing title), 429 (rate limited), 500 (render failed)