Guide
1200 × 630 PNG
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.
Image details
One layout, accurate every time.
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
Use the same reliable visual system for guides, launches, changelogs, documentation, and programmatic SEO pages.
Guide
1200 × 630 PNG
Product
1200 × 630 PNG
Release
1200 × 630 PNG
How it works
The agent handles content decisions. OG Image API handles exact rendering and a stable output your site can publish.
Pass a title plus optional description, site name, category, and accent color.
Inputs are validated and rendered into a deterministic 1200 × 630 PNG.
Use the returned URL and metadata in Next.js, a CMS, or an agent workflow.
API reference
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 · requiredArticle or page title, up to 110 characters
descriptionstring · optionalSupporting copy, up to 180 characters
siteNamestring · optionalBrand or publication name
categorystring · optionalGuide, Product, Release, or another label
accenthex · optionalSix-digit brand color such as #2563eb
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"
}'{
"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
Start in the browser, then connect the same endpoint to your content agent when the workflow is ready.