Built for agents, useful for everyone

OG Image Generator

Free OG image generator for AI agents—turn any page title into a 1200 × 630 PNG and ready-to-use Open Graph metadata.

Copy this to your agent

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

Prefer to generate it yourself? OG image generator

Showcase

OG images, ready to publish.

Explore examples across four templates.

OpenAI · Dreamlike Open Graph image example

OpenAI · Dreamlike

1200 × 630 PNG

OpenAI · Blue Open Graph image example

OpenAI · Blue

1200 × 630 PNG

Linear · Ocean Open Graph image example

Linear · Ocean

1200 × 630 PNG

Linear · Sunset Open Graph image example

Linear · Sunset

1200 × 630 PNG

Editorial · Product Open Graph image example

Editorial · Product

1200 × 630 PNG

Aurora · Meadow Open Graph image example

Aurora · Meadow

1200 × 630 PNG

Image details

Choose a template, theme, and title size.

Template
Background
Title size
Live preview
OpenAI gradient · Generated · 74px · 1200 × 630

Free OG Generator for AI Agents

The downloaded PNG uses the same content and layout.

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

Choose template and style

Choose editorial, a color gradient, an OpenAI gradient, or Aurora Background with a safe title size.

02

Send the page title

Add editorial fields when needed, then render 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. Choose editorial, gradient-title, openai-gradient, or aurora-background, then authenticate with the same X-API-KEY created in Account Settings.

titlestring · required

Article or page title, up to 110 characters

templateenum · optional

editorial (default), gradient-title, openai-gradient, or aurora-background

themeenum · optional

ocean, sunset, violet, midnight, or emerald

backgroundenum · optional

dreamlike (default), blue, floral, or sky

auroraenum · optional

meadow (default), ember, tide, or generated

colorshex,hex,hex · optional

Three aurora colors, used when aurora is generated

titleSizeenum · optional

small, medium (default), large, or custom

fontSizeinteger · optional

Custom title size from 32 through 96 pixels

descriptionstring · optional

Supporting copy, up to 180 characters

siteNamestring · optional

Optional brand name; empty values are hidden

categorystring · optional

Optional label; empty values are hidden

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": "Free OG Generator for AI Agents",
    "template": "openai-gradient",
    "background": "dreamlike",
    "titleSize": "custom",
    "fontSize": 58
  }'
Responseapplication/json
{
  "imageUrl": "https://twittershots.com/api/og-image?title=...",
  "width": 1200,
  "height": 630,
  "contentType": "image/png",
  "alt": "Free OG Generator for AI Agents",
  "template": "openai-gradient",
  "background": "dreamlike",
  "titleSize": "custom",
  "fontSize": 58,
  "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.