Skip to content

Meme Generator Template

Create image-based content with bold captions for marketing.

Template ID

template: "meme"

Preview

Meme-style layout featuring:

  • Full background image
  • Bold top caption
  • Bold bottom caption
  • Impact-style typography
  • Optional branding

Parameters

ParameterTypeRequiredDescription
image_urlstringYesBackground image URL
caption_topstringNoTop text (large, bold)
caption_bottomstringNoBottom text (large, bold)
titlestringNoAlternative to caption_top
subtitlestringNoAlternative to caption_bottom
themestringNodark (default) or light
logo_urlstringNoSmall brand watermark

Example Request

bash
curl -X POST https://ogimageapi.io/api/generate \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "image_url": "https://example.com/background.jpg",
    "caption_top": "WHEN YOUR CODE WORKS",
    "caption_bottom": "ON THE FIRST TRY",
    "template": "meme",
    "theme": "dark"
  }' \
  --output meme-og.png

Layout Structure

┌─────────────────────────────────────────┐
│                                         │
│        WHEN YOUR CODE WORKS             │
│                                         │
│   ┌─────────────────────────────────┐   │
│   │                                 │   │
│   │      Background Image           │   │
│   │                                 │   │
│   └─────────────────────────────────┘   │
│                                         │
│         ON THE FIRST TRY                │
│                                         │
│                                  [Logo] │
└─────────────────────────────────────────┘

Theme Variations

Dark Theme

  • White text with black outline
  • Classic meme look
  • Maximum readability

Light Theme

  • Dark text with white outline
  • Works on bright images
  • More subtle appearance

Use Cases

Content TypeRecommended Setup
Marketing memesDark theme
Social contentDark theme
Relatable postsEither theme
Product humorDark + logo
Community contentDark theme

Best Practices

  1. Use quality source images — Resolution matters
  2. Keep text SHORT — All caps, few words
  3. Match text to image — The combo makes the joke
  4. Brand subtly — Small logo, if any
  5. Test readability — Text must be visible

Integration Examples

Marketing Meme Generator

javascript
async function generateMarketingMeme(meme) {
  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({
      image_url: meme.backgroundImage,
      caption_top: meme.topText.toUpperCase(),
      caption_bottom: meme.bottomText.toUpperCase(),
      template: 'meme',
      theme: 'dark',
      logo_url: 'https://mycompany.com/small-logo.png'
    })
  });
  
  return response;
}

User-Generated Content

javascript
// Allow users to create memes with your branding
async function createUserMeme(userId, topText, bottomText, imageUrl) {
  // Validate inputs
  if (topText.length > 50 || bottomText.length > 50) {
    throw new Error('Text too long');
  }
  
  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({
      image_url: imageUrl,
      caption_top: topText,
      caption_bottom: bottomText,
      template: 'meme',
      theme: 'dark'
    })
  });
  
  // Save and return...
}

Caption Guidelines

DoDon't
ALL CAPSLowercase
Short phrasesLong sentences
Punchy wordsComplex vocabulary
Setup/PunchlineSingle thought
Clear contrastText blending into image

Image Specifications

PropertyRecommendation
FormatJPG or PNG
Size1200×630 px minimum
Aspect ratio1.91:1 ideal
ContentHigh contrast areas for text
QualityClear, not blurry

Marketing Use Cases

Unlike casual memes, marketing memes should:

  1. Relate to your audience — Industry-specific humor
  2. Stay on brand — Appropriate tone
  3. Drive action — Subtle CTA or brand awareness
  4. Be shareable — Genuinely funny or relatable

Generate stunning Open Graph images programmatically.