Stop using static open graph images. Render a custom branded 1200×630 PNG for every blog post, product, or landing page, dynamically, via API.
An open graph image API generates 1200×630 social preview images on demand from branded HTML templates. Instead of designing static images manually or running a self-hosted Puppeteer cluster, you POST a template and get a CDN-cached PNG back instantly, ready to serve as your og:image meta tag on every page, blog post, or product listing.
Three steps from HTML template to live og:image tag.
Create a branded 1200×630 HTML template with your title, description, and logo. Use any CSS you like.
Send the rendered HTML to our API with format=png and image_width=1200, image_height=630.
Use response_type=url to get a CDN-backed URL back. Set it as your og:image meta tag and you're done.
Your HTML template controls every pixel: logo, fonts, colors, layout. No compromise on design quality.
Set cache_ttl=86400 and the CDN serves the same image for 24 hours. Zero latency for repeat crawls.
Next.js, Nuxt, Astro, SvelteKit: point your og:image route at our API and you're done.
No complicated canvas rendering or self-hosted Puppeteer cluster. Send HTML, get PNG. That's it.
// Next.js API route — /api/og
import { render } from './og-template'; // your HTML template
export default async function handler(req, res) {
const { title, description } = req.query;
const html = render({ title, description });
const response = await fetch('https://screenshotcore.com/api/v1/screenshot', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.SCREENSHOT_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
source: 'html',
html,
format: 'png',
image_width: 1200,
image_height: 630,
response_type: 'url', // returns a CDN URL
cache_ttl: 86400, // cache for 24 hours
}),
});
const { url } = await response.json();
res.redirect(url); // og:image points here
}An open graph image API generates 1200×630 social preview images automatically from an HTML template. Instead of designing static OG images manually, you send branded HTML to the API and get a PNG back, ready to serve as your og:image meta tag on any page.
Build an HTML template with your title, description, and logo. POST the rendered HTML to the screenshot API with format=png, image_width=1200, and image_height=630. Use response_type=url to receive a CDN-backed URL and set it as your og:image tag. The image is cached and served instantly on every subsequent crawl.
The standard OG image size is 1200×630 pixels at a 1.91:1 aspect ratio. This works across Facebook, Twitter/X, LinkedIn, and Slack link previews. Pass image_width=1200 and image_height=630 to get the exact dimensions.
Yes. Use response_type=url and set cache_ttl to your desired TTL in seconds (e.g. 86400 for 24 hours). The API returns a CDN-backed URL that serves the cached image for all repeat requests, with zero latency for social crawlers.
7-day free trial — 300 screenshots + 50 videos. No credit card required.
Get your free API key →