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. New templates accept arbitrary extra fields through the variables object — see each template’s section in the Templates Gallery for the full list of supported keys.

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.

An e-commerce template for product showcases. Accepts variables.price, variables.badge, and variables.brand. Supports a product image via images.product.

Best for: e-commerce product shares, catalogue cards, promotional social posts.

A conference and event template. Accepts variables.date, variables.location, variables.speaker, and variables.speakerRole.

Best for: conferences, meetups, webinars, workshop announcements.

A quote-focused template for social proof. Accepts variables.name, variables.role, and variables.company. Supports a circular avatar via images.avatar.

Best for: customer testimonials, pull-quote social posts, review cards.

A developer-tool template modelled after GitHub repository cards. Accepts variables.owner, variables.stars, and variables.language. Supports a repo avatar via images.avatar.

Best for: open source announcements, developer portfolio cards.

An editorial news card template. Accepts variables.source, variables.date, and variables.category. Designed to work with a background image.

Best for: news articles, editorial content, press release cards.

A SaaS pricing-card template. Accepts variables.plan, variables.price, variables.period, variables.features (newline-separated), and variables.cta.

Best for: pricing page social shares, upgrade prompts, plan comparison cards.

A personal or professional profile template. Accepts variables.role, variables.company, and variables.bio. Supports an avatar via images.avatar.

Best for: speaker cards, author bios, team member spotlights.

A launch-oriented template for product releases and milestones. Accepts variables.subtitle and variables.cta. Supports a background image via images.background.

Best for: product launches, feature releases, milestone announcements.

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
product-cardog, twitterProduct image needs landscape space
eventog, linkedinMetadata row benefits from wide canvas
testimonialsquare, twitterQuote text reads best at 1:1 and 16:9
github-repoog, twitterMetadata row designed for landscape
news-articleog, twitterBackground images shine in landscape
pricingog, squareFeature list needs vertical space
profile-cardtwitter, squareAvatar + bio layout suits 16:9 and 1:1
announcementog, twitter, storyWorks across all three aspect ratios

The story format works best with social-card, announcement, 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|1300× vs Puppeteer
Template