← Image automation guides

Publishing API

Open Graph Image Generation API

Generate consistent Open Graph images from page titles, categories, authors, products, and hero images at publish time.

Quick answer

An Open Graph image API turns structured page metadata into a stable social preview URL while the website keeps normal title and description metadata accessible to crawlers.

Best-fit use cases

Blogs and publications
Product pages
Documentation
Programmatic landing pages

Implementation

A reliable four-step workflow

1

Model page types

Create a small template family for articles, products, docs, and updates.

2

Generate on publish

Send validated metadata when a page is created or materially updated.

3

Write metadata

Add the absolute output URL and accurate dimensions to Open Graph tags.

4

Handle caches

Use a documented regeneration and cache-busting process after corrections.

Concrete example
trigger
A blog post publishes
inputs
Title, category, author, hero image
output
A 1200×630 social preview
destination
og:image metadata and social queue

Frequently asked questions

Does an OG image replace title metadata?

No. Keep title and description in normal metadata and visible page content.

Should images be generated on every page request?

Usually no. Generate at publish time or use a deterministic cached URL.

Continue the workflow

Build one production-shaped example

Start with one approved template, realistic data, and the exact trigger your team intends to use.

Start free