Skip to content

Social Share Template

Optimized for maximum engagement on social platforms.

Template ID

template: "social"

Preview

Engagement-focused layout featuring:

  • Bold, attention-grabbing title
  • Short description
  • Call-to-action button
  • Author attribution
  • Eye-catching design

Parameters

ParameterTypeRequiredDescription
titlestringYesBold headline
descriptionstringNoSupporting text
author_namestringNoCreator/author name
author_avatar_urlstringNoAuthor photo
call_to_actionstringNoCTA text (e.g., "Read More")
themestringNodark (default) or light
logo_urlstringNoBrand logo

Example Request

bash
curl -X POST https://ogimageapi.io/api/generate \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "title": "🚀 We just hit 10,000 users!",
    "description": "Thank you for being part of our journey. Here'"'"'s what we learned...",
    "author_name": "Alex from StartupXYZ",
    "author_avatar_url": "https://example.com/alex.jpg",
    "call_to_action": "Read the Story",
    "template": "social",
    "theme": "dark"
  }' \
  --output social-og.png

Layout Structure

┌─────────────────────────────────────────┐
│                                  [Logo] │
│                                         │
│   🚀 We just hit 10,000 users!          │
│                                         │
│   Thank you for being part of our       │
│   journey. Here's what we learned...    │
│                                         │
│   ┌─────────────────────┐               │
│   │   Read the Story    │               │
│   └─────────────────────┘               │
│                                         │
│   ┌──────┐  Alex from StartupXYZ        │
│   │Avatar│                              │
│   └──────┘                              │
│                                         │
└─────────────────────────────────────────┘

Theme Variations

Dark Theme

  • Bold, modern look
  • High contrast
  • Works great in Twitter/X feeds

Light Theme

  • Clean, professional
  • LinkedIn-friendly
  • Softer appearance

Use Cases

Content TypeRecommended Setup
AnnouncementsDark + emoji in title
MilestonesDark + CTA
ThreadsDark + author
Case studiesLight theme
TestimonialsEither theme

Best Practices

  1. Use emojis strategically — One or two max
  2. Keep titles punchy — Under 10 words
  3. Include CTA — Drive clicks
  4. Add your face — Personal connection matters
  5. Test both themes — See what works for your audience

Integration Examples

Twitter/X Thread Headers

javascript
async function generateThreadHeader(thread) {
  const response = await fetch('https://ogimageapi.io/api/generate', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-API-Key': process.env.OG_IMAGE_API_KEY
    },
    body: JSON.stringify({
      title: thread.hook,
      description: `A ${thread.tweets.length}-part thread on ${thread.topic}`,
      author_name: thread.author.name,
      author_avatar_url: thread.author.avatar,
      call_to_action: 'Read Thread',
      template: 'social',
      theme: 'dark'
    })
  });
  
  return response;
}

Announcement Posts

javascript
async function generateAnnouncementOG(announcement) {
  const response = await fetch('https://ogimageapi.io/api/generate', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-API-Key': process.env.OG_IMAGE_API_KEY
    },
    body: JSON.stringify({
      title: `${announcement.emoji} ${announcement.headline}`,
      description: announcement.subtext,
      call_to_action: announcement.cta || 'Learn More',
      logo_url: 'https://mycompany.com/logo.png',
      template: 'social',
      theme: 'dark'
    })
  });
  
  return response;
}
TypeCTA Text
Blog posts"Read Article"
Products"Get Started"
Events"Register Now"
Updates"Learn More"
Launches"Try It Free"

Platform Optimization

PlatformTip
Twitter/XDark theme + emoji
LinkedInLight theme, professional tone
FacebookEither, include faces
DiscordDark theme

Generate stunning Open Graph images programmatically.