🎨 OG Image Generator API

Generate beautiful Open Graph images and profile cards

📊 Deployment Information

Current Deployment

Version: unknown

Branch: unknown

Deployed: 2025-07-21T06:18:52.738Z

Environment: Cloudflare Workers

🚀 API Endpoints

GET /og
Generate customizable Open Graph images with different styles

Query Parameters:

mainText string
Main title text (default: "Default Title")
description string
Description text (default: "Default Description")
footerText string
Footer text (default: "Footer Text")
style string
Style variant: "1" (gradient), "2" (eco), "3" (cloudflare), "4" (github) (default: "1")
GET /profile/
Generate profile cards with custom images and text

Query Parameters:

imageUrl string required
External image URL (must start with http/https)
title string
Profile title/name (default: "John Doe")
subtitle string
Profile subtitle/role (default: "Software Engineer")
description string
Profile description (optional)
font string
Font name from Google Fonts (e.g., "Roboto", "Lato") or "inter" for the default local font. (default: "inter")
minSize number
Minimum font size for the title. (default: 64)
maxSize number
Maximum font size for the title. (default: 105)
charWidthRatio number
Character width ratio for font size calculation. (default: varies by font)
scalingExponent number
Scaling exponent for dynamic font sizing. (default: 1.015)
fontFallback string
Fallback font family. Can be "serif" or "sans-serif". (default: "sans-serif")
GET /profile/:handle
Generate profile cards with handle in URL path

Path Parameters:

handle string
Profile handle (used as default title)

Query Parameters:

imageUrl string required
External image URL (must start with http/https)
title string
Override profile title (default: handle)
subtitle string
Profile subtitle/role (default: "Software Engineer")
description string
Profile description (optional)
font string
Font name from Google Fonts (e.g., "Roboto", "Lato") or "inter" for the default local font. (default: "inter")
minSize number
Minimum font size for the title. (default: 64)
maxSize number
Maximum font size for the title. (default: 105)
charWidthRatio number
Character width ratio for font size calculation. (default: varies by font)
scalingExponent number
Scaling exponent for dynamic font sizing. (default: 1.015)
fontFallback string
Fallback font family. Can be "serif" or "sans-serif". (default: "sans-serif")

💡 Usage Tips

🎨 Font Weight Requirements

The profile card component uses multiple font weights to create visual hierarchy:

⚠️ Important Font Compatibility

Required: At minimum, fonts must support weight 700 (bold) for the title.

Recommended: For best visual hierarchy, choose fonts that support weights 400, 500, 600, and 700.

Fallback: Missing weights will fall back to the closest available weight automatically.

✅ Recommended Fonts (Full Weight Support):
  • Roboto - Clean, modern sans-serif
  • Inter - Optimized for UI (default local font)
  • Open Sans - Highly readable
  • Poppins - Modern geometric sans-serif
  • Montserrat - Stylish sans-serif
  • Nunito - Rounded, friendly
⚠️ Limited Weight Fonts (Will Work with Fallbacks):
  • Lato - Supports 100, 300, 400, 700, 900 (missing 500, 600)
  • Oswald - Supports 200-700 (missing some intermediate weights)
  • Raleway - Variable font (good support)

These fonts will still work, but may have less ideal visual hierarchy due to missing intermediate weights.