Built for agents, useful for everyone

Free Open Graph (OG) Image Generator for AI Agents

Give your agent an article title. Get an accurate, brand-safe 1200 × 630 image URL and ready-to-use social metadata.

Give this to your agent

It will guide setup, collect your image details, and generate the PNG.

No editor requiredExact text renderingJSON or PNG output

Image details

One layout, accurate every time.

Free MVP
Live preview
1200 × 630 PNG
GuideYour product

Ship better social previews with your AI agent

Turn article metadata into a clean, accurate Open Graph image.

The downloaded PNG uses the same content and layout.

Showcase

One layout. Many publishing moments.

Use the same reliable visual system for guides, launches, changelogs, documentation, and programmatic SEO pages.

Guide Open Graph image example

Guide

1200 × 630 PNG

Product Open Graph image example

Product

1200 × 630 PNG

Release Open Graph image example

Release

1200 × 630 PNG

How it works

From article context to social preview

The agent handles content decisions. OG Image API handles exact rendering and a stable output your site can publish.

01

Send article metadata

Pass a title plus optional description, site name, category, and accent color.

02

Render a safe layout

Inputs are validated and rendered into a deterministic 1200 × 630 PNG.

03

Install the image URL

Use the returned URL and metadata in Next.js, a CMS, or an agent workflow.

API reference

A small API agents can understand.

POST returns an agent-friendly JSON object by default. Authenticate with the same X-API-KEY created in Account Settings. Set response: image when you need PNG bytes.

titlestring · required

Article or page title, up to 110 characters

descriptionstring · optional

Supporting copy, up to 180 characters

siteNamestring · optional

Brand or publication name

categorystring · optional

Guide, Product, Release, or another label

accenthex · optional

Six-digit brand color such as #2563eb

Full OpenAPI specification
RequestPOST /api/og-image
curl https://twittershots.com/api/og-image \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: $TWITTERSHOTS_API_KEY" \
  -d '{
    "title": "How to ship better social previews",
    "description": "Article metadata in. OG image out.",
    "siteName": "Acme",
    "category": "Guide",
    "accent": "#2563eb"
  }'
Responseapplication/json
{
  "imageUrl": "https://twittershots.com/api/og-image?title=...",
  "width": 1200,
  "height": 630,
  "contentType": "image/png",
  "alt": "How to ship better social previews",
  "metadata": {
    "openGraph": { "images": ["https://..."] },
    "twitter": { "card": "summary_large_image", "images": ["https://..."] }
  }
}

Built from a real workflow

“Our agent can now finish the article and its social preview in the same task—without reusing the wrong image or changing the headline.”

TwitterShots publishing workflow

The use case behind OG Image API

Give your next article the preview it deserves.

Start in the browser, then connect the same endpoint to your content agent when the workflow is ready.