API REFERENCE

OGShot APIリファレンス

URLひとつでOG画像を動的に生成します。

認証

Pass your API key as a query parameter or Authorization: Bearer header.

terminal
# Query parameterhttps://og.planhub.kr/v1/og?title=Hello&api_key=og_live_...# Authorization headercurl https://og.planhub.kr/v1/og?title=Hello \  -H "Authorization: Bearer og_live_..."

Endpoint

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

パラメータ

ParameterTypeDescription
titlestring必須Main text displayed on the image. Max 120 characters.
subtitlestring任意Secondary text below the title.
themestring任意Visual theme. Options: dark (default), light, minimal, vibrant.
platformstring任意Platform preset: twitter, kakao, slack, whatsapp. Auto-adjusts size and format.
api_keystring任意Your API key. Required for paid plans. Can also be sent as Bearer token.

レスポンス

On success: 200 image/png or image/jpeg binary. On rate limit: 429.

Response HeaderDescription
Content-Typeimage/png or image/jpeg
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.

コード例

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 LimitOverage
Free50 images429 error (no overage)
Hobby500 images$3 / 1,000 images
Starter3,000 images$3 / 1,000 images
Pro15,000 images$3 / 1,000 images
Scale100,000 images$3 / 1,000 images

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

Get API Key →← Home