Skip to content

Real Estate Template

Property listings with photos, pricing, and key details.

Template ID

template: "realestate"

Preview

Property-optimized layout featuring:

  • Large property photo
  • Price prominently displayed
  • Address/location
  • Key specs (beds, baths, sqft)
  • Agency branding

Parameters

ParameterTypeRequiredDescription
titlestringYesPrice (e.g., "$1,250,000")
subtitlestringNoProperty type or headline
property_image_urlstringNoProperty photo URL
addressstringNoProperty address
bedsnumberNoNumber of bedrooms
bathsnumberNoNumber of bathrooms
sqftstringNoSquare footage
themestringNodark (default) or light
logo_urlstringNoAgency/brokerage 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": "$1,250,000",
    "subtitle": "Luxury Modern Home",
    "property_image_url": "https://example.com/house.jpg",
    "address": "123 Oak Street, Beverly Hills, CA 90210",
    "beds": 4,
    "baths": 3,
    "sqft": "3,200",
    "template": "realestate",
    "theme": "light",
    "logo_url": "https://example.com/realty-logo.png"
  }' \
  --output listing-og.png

Layout Structure

┌─────────────────────────────────────────┐
│                                  [Logo] │
│                                         │
│   ┌─────────────────────────────────┐   │
│   │                                 │   │
│   │      Property Photo             │   │
│   │                                 │   │
│   └─────────────────────────────────┘   │
│                                         │
│   $1,250,000        4 BD | 3 BA | 3,200 │
│   Luxury Modern Home                    │
│   123 Oak Street, Beverly Hills         │
│                                         │
└─────────────────────────────────────────┘

Theme Variations

Dark Theme

  • Dramatic, high-end look
  • Great for luxury properties
  • Photo really pops

Light Theme

  • Clean, professional
  • Traditional real estate feel
  • Better for family homes

Use Cases

Property TypeRecommended Setup
Luxury homesDark theme
Family homesLight theme
ApartmentsEither theme
CommercialDark theme
Land/lotsLight theme

Best Practices

  1. Use high-quality photos — First impressions matter
  2. Show the hero shot — Best angle of the property
  3. Include all specs — Buyers want quick info
  4. Brand consistently — Same logo across all listings

Integration Example

MLS Integration

javascript
async function generateListingOG(listing) {
  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: formatPrice(listing.price),
      subtitle: listing.property_type,
      property_image_url: listing.photos[0],
      address: `${listing.address}, ${listing.city}, ${listing.state}`,
      beds: listing.bedrooms,
      baths: listing.bathrooms,
      sqft: listing.sqft.toLocaleString(),
      template: 'realestate',
      theme: listing.price > 1000000 ? 'dark' : 'light',
      logo_url: 'https://myrealty.com/logo.png'
    })
  });
  
  return response;
}

Bulk Generation for Listings

javascript
async function generateAllListingImages(listings) {
  const results = await Promise.all(
    listings.map(async (listing) => {
      const image = await generateListingOG(listing);
      const buffer = await image.arrayBuffer();
      
      fs.writeFileSync(
        `./public/listings/${listing.mls_id}.png`,
        Buffer.from(buffer)
      );
      
      return { mls_id: listing.mls_id, status: 'generated' };
    })
  );
  
  return results;
}

Photo Specifications

PropertyRecommendation
FormatJPG (photos compress better)
Size1600×1200 px minimum
Aspect ratio4:3 or 16:9
QualityHigh resolution, well-lit
ContentExterior hero shot

Generate stunning Open Graph images programmatically.