API REFERENCE

OGShot API Reference

Generate OG images dynamically with a single URL.

Endpoint

GEThttps://og.planhub.kr/v1/og

Authentication

Method 1Bearer Token (server-side)

Pass your API key in the Authorization header. Best for server-to-server calls where the key is never exposed to the browser.

terminal
# Authorization headercurl https://og.planhub.kr/v1/og?title=Hello \  -H "Authorization: Bearer ogshot_sk_..."
Method 2Signed URL (recommended for embeds)

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.

Signature algorithm: sig = HMAC-SHA256(key_secret, canonical) where canonical = all params (except sig itself) sorted alphabetically and joined as key=value&key=value.
node.js
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.

Parameters

ParameterTypeDescription
titlestringrequiredMain text displayed on the image. Max 120 characters.
subtitlestringoptionalSecondary text below the title.
themestringoptionalVisual theme: dark (default), light, minimal, vibrant.
fontstringoptionalFont override: pretendard (default), notosans, inter.
formatstringoptionalOutput format: png (default), jpg, webp.
platformstringoptionalPlatform preset: twitter, kakao, slack, whatsapp. Auto-adjusts size and format.
wnumberoptionalImage width in pixels. Default 1200.
hnumberoptionalImage height in pixels. Default 630.
bgstringoptionalBackground color. Hex (#1a1a2e) or CSS gradient value.
accentstringoptionalAccent color (hex). Applied to decorative elements.
imagestringoptionalBackground image URL. URL-encode the value.
overlaynumberoptionalBackground overlay opacity (0–1). Used with image.
logostringoptionalLogo image URL shown at the bottom of the image.
kidstringoptionalKey ID for Signed URL authentication. Required with sig.
tsnumberoptionalUnix timestamp. Required with sig (included automatically when signing).
sigstringoptionalHMAC-SHA256 signature. Required for Signed URL auth.

Response

On success: 200 image/png, image/jpeg, or image/webp binary. On rate limit: 429. On invalid signature: 401.

Response HeaderDescription
Content-Typeimage/png, image/jpeg, or image/webp
X-RateLimit-LimitMaximum requests for your plan this month.
X-RateLimit-RemainingRemaining requests this month.
X-RateLimit-ResetISO 8601 timestamp when the counter resets.
X-OGShot-CacheHIT if served from cache, MISS if freshly rendered.

Code Examples

index.html
<!-- og:image meta 태그 하나면 끝 --><meta property="og:image"  content="https://og.planhub.kr/v1/og    ?title=나의 블로그 글 제목    &theme=dark    &api_key=YOUR_KEY" />

Rate Limits

PlanMonthly LimitOver Limit
Free50 images429 error
Hobby500 images429 error
Starter3,000 images429 error
Pro15,000 images429 error
Scale100,000 images429 error

Cached images do not count against your quota. The counter resets on the 1st of each month (UTC).

Get API Key →Try Generator →← Home