URLひとつでOG画像を動的に生成します。
Pass your API key in the Authorization header. Best for server-to-server calls where the key is never exposed to the browser.
# Authorization headercurl https://og.planhub.kr/v1/og?title=Hello \ -H "Authorization: Bearer ogshot_sk_..."
A Signed URL embeds an HMAC-SHA256 signature computed from the request parameters and a timestamp. The secret key is never included in the URL — only the key ID (kid), timestamp (ts), and signature (sig). Safe to embed directly in HTML <meta> tags.
sig = HMAC-SHA256(key_secret, canonical) where canonical = all params (except sig itself) sorted alphabetically and joined as key=value&key=value.import { createHmac } from 'node:crypto'; // params must include: title, kid (key UUID), ts (unix timestamp)function sign(secret, params) { const canonical = Object.entries(params) .filter(([k]) => k !== 'sig') .sort(([a], [b]) => a.localeCompare(b)) .map(([k, v]) => `${k}=${v}`).join('&'); return createHmac('sha256', secret) .update(canonical).digest('hex');} // Or use the dashboard Generator to create Signed URLs without code
Use the OG Generator in your dashboard to create Signed URLs without writing code. The dashboard signs the URL using your selected API key and returns a ready-to-paste <meta> tag.
| Parameter | Type | Description | |
|---|---|---|---|
title | string | 必須 | Main text displayed on the image. Max 120 characters. |
subtitle | string | 任意 | Secondary text below the title. |
theme | string | 任意 | Visual theme: dark (default), light, minimal, vibrant. |
font | string | 任意 | Font override: pretendard (default), notosans, inter. |
format | string | 任意 | Output format: png (default), jpg, webp. |
platform | string | 任意 | Platform preset: twitter, kakao, slack, whatsapp. Auto-adjusts size and format. |
w | number | 任意 | Image width in pixels. Default 1200. |
h | number | 任意 | Image height in pixels. Default 630. |
bg | string | 任意 | Background color. Hex (#1a1a2e) or CSS gradient value. |
accent | string | 任意 | Accent color (hex). Applied to decorative elements. |
image | string | 任意 | Background image URL. URL-encode the value. |
overlay | number | 任意 | Background overlay opacity (0–1). Used with image. |
logo | string | 任意 | Logo image URL shown at the bottom of the image. |
kid | string | 任意 | Key ID for Signed URL authentication. Required with sig. |
ts | number | 任意 | Unix timestamp. Required with sig (included automatically when signing). |
sig | string | 任意 | HMAC-SHA256 signature. Required for Signed URL auth. |
On success: 200 image/png, image/jpeg, or image/webp binary. On rate limit: 429. On invalid signature: 401.
| Response Header | Description |
|---|---|
Content-Type | image/png, image/jpeg, or image/webp |
X-RateLimit-Limit | Maximum requests for your plan this month. |
X-RateLimit-Remaining | Remaining requests this month. |
X-RateLimit-Reset | ISO 8601 timestamp when the counter resets. |
X-OGShot-Cache | HIT if served from cache, MISS if freshly rendered. |
<!-- og:image meta 태그 하나면 끝 --><meta property="og:image" content="https://og.planhub.kr/v1/og ?title=나의 블로그 글 제목 &theme=dark &api_key=YOUR_KEY" />
| Plan | Monthly Limit | Over Limit |
|---|---|---|
| Free | 50 images | 429 error |
| Hobby | 500 images | 429 error |
| Starter | 3,000 images | 429 error |
| Pro | 15,000 images | 429 error |
| Scale | 100,000 images | 429 error |
Cached images do not count against your quota. The counter resets on the 1st of each month (UTC).