Generate favicons and OG images programmatically. Free tier: 5 requests/day. Pro: unlimited.
https://og.hjlabs.in
Generate an OG image via URL parameters. Returns SVG image.
| Parameter | Type | Description |
|---|---|---|
title | string | Main title text (required) |
subtitle | string | Subtitle text |
author | string | Author name |
template | string | Template: default, blog, product, social, minimal, nature |
brand | string | Brand text (top-left) |
bg | hex color | Custom background color |
color | hex color | Custom text color |
accent | hex color | Custom accent color |
Example:
https://og.hjlabs.in/api/og?title=My+Blog+Post&template=blog&brand=mysite.com
Generate via JSON body. Same parameters as GET.
{
"title": "My Blog Post",
"subtitle": "A deep dive into...",
"template": "blog",
"brand": "mysite.com"
}
Generate a favicon ZIP with all sizes. Returns application/zip.
| Field | Type | Description |
|---|---|---|
type | string | letter, text, emoji, gradient, or upload |
letter | string | Single character (for letter/gradient type) |
text | string | 1-3 characters (for text type) |
emoji | string | Emoji character (for emoji type) |
bgColor | hex | Background color |
textColor | hex | Text/letter color |
color1 | hex | Gradient start color |
color2 | hex | Gradient end color |
shape | string | rounded or circle (gradient type) |
siteName | string | For manifest file generation |
imageData | base64 | Data URL of uploaded image |
Example (curl):
curl -X POST https://og.hjlabs.in/api/generate-favicon \
-H "Content-Type: application/json" \
-d '{"type":"letter","letter":"H","bgColor":"#3b82f6","textColor":"#fff"}' \
-o favicons.zip
Generate a single favicon preview as SVG. Useful for live previews.
| Parameter | Type | Description |
|---|---|---|
type | string | letter, text, emoji, gradient |
letter | string | Character to display |
bg | hex | Background color |
color | hex | Text color |
size | number | Output size in pixels (default: 256) |
| Plan | Favicon ZIP | OG Images | Preview SVG |
|---|---|---|---|
| Free | 10/day | 50/day | 100/day |
| Pro ($12/mo) | Unlimited | 10K/mo | Unlimited |
| Agency ($29/mo) | Unlimited | Unlimited | Unlimited |
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad request (missing/invalid parameters) |
| 429 | Rate limit exceeded |
| 500 | Server error |