Skip to content

Formats & Templates

OG Engine separates format (the canvas dimensions) from template (how content is laid out within those dimensions). This lets you mix and match: use the blog-hero template with the twitter format for a card that looks great in a Twitter feed.

Each format maps to a canonical set of dimensions used by social platforms:

FormatDimensionsAspect RatioPrimary Use
og1200 × 630 px1.91:1Open Graph (Facebook, Slack, Discord)
twitter1200 × 675 px16:9Twitter / X summary_large_image card
square1080 × 1080 px1:1Instagram, general purpose
linkedin1200 × 627 px1.91:1LinkedIn posts
story1080 × 1920 px9:16Instagram Stories, TikTok, Snapchat

Narrower or taller canvases affect how many lines your text wraps to, and therefore how many lines are shown before overflow kicks in:

FormatMax Title LinesMax Desc LinesNotes
og34Standard — most templates optimized for this
twitter34Nearly identical to og
square45More vertical space for text
linkedin34Slightly narrower than og
story56Tall format — text has more room

These limits apply at the default font sizes (48px title, 22px description). Increasing titleSize reduces the number of lines before overflow, and vice versa. Use the /validate endpoint to check without incurring a render.

Templates control the visual structure: background, typography placement, decorative elements, and how author and tag fields appear.

The flagship template. Features:

  • Subtle grid background pattern
  • Gradient overlay from the style.gradient setting
  • Colored accent bar in the top-left corner driven by style.accent
  • Tag rendered as a pill badge below the title
  • Author line at the bottom
  • Supports left, center, and bottom layouts

Best for: blog posts, documentation, SaaS marketing pages — any general-purpose OG card.

A minimal template designed for Twitter and Instagram where content should be immediately legible in a feed:

  • Large centered title dominates the canvas
  • Description rendered smaller below
  • No grid or decorative elements — clean, bold, modern
  • Accent color used as a prominent horizontal divider

Best for: social shares, announcements, quote cards.

Designed to work with a background image. Features:

  • Background image fills the canvas with cover-crop behavior
  • Dark overlay (controlled by style.overlayOpacity) ensures text legibility
  • Text anchored to the bottom third of the canvas
  • Accent bar and tag pill placed above the title

Best for: articles with cover images, editorial content, newsletters with photography.

A horizontal, CTA-oriented layout:

  • Title on the left, accent button/tag on the right
  • Compact vertical space — optimized for email clients
  • Gradient background with high-contrast text
  • Author field renders as a small “from” label

Best for: email headers, newsletters, transactional email banners.

While all combinations are technically valid, some pairings produce noticeably better results:

TemplateBest FormatsNotes
defaultog, linkedinOptimized for landscape 1.91:1 ratio
social-cardtwitter, squareLooks great at 16:9 and 1:1
blog-heroog, twitterBackground images shine in landscape
email-bannerog, linkedinHorizontal layout requires wide canvas

The story format works best with social-card or default using a bottom layout, so the text sits comfortably in the lower half of the tall canvas.

Both fields are top-level in the request body:

{
"format": "twitter",
"template": "social-card",
"title": "Announcing OG Engine 1.0",
"description": "Generate images in ~22ms. No browser required."
}

If template is omitted, it defaults to "default".

0.0ms|8500x
Template