Generates a custom Open Graph image (1200x630px) with the specified title and optional styling parameters. Perfect for social media previews.
Note: The actual endpoint includes .png extension (e.g., /og/My-Title.png)
Query parameters
-
Color theme for the image background
Values are
darkorlight. Default value isdark. -
Custom font size for the title (e.g., "120px"). If not specified, the font size is automatically calculated based on title length.
-
Optional caption text displayed below the title
-
Font size for the caption text
Default value is
70px. -
URLs of images to embed in the OG image (max 180x180px each). Can be specified multiple times for multiple images.
-
Hex colors for the title gradient. Can be specified multiple times for multi-color gradients. Omit '#' prefix (e.g., "1d3a4d" not "#1d3a4d").
curl \
--request GET 'http://localhost:3000/api/og/Welcome-to-My-Blog.png'
{
"error": "Failed to generate image"
}