Docs

API reference

One endpoint, one URL, one PNG. Read this once and you're done.

Endpoint

GET https://socialcard-api.reevine1331.workers.dev/v1/image

Returns image/png on success. Returns 400 (validation), 401 (key invalid / missing), 429 (monthly limit), or 500 (render error) on failure.

Authentication

Pass your key as the api_key query param or via the X-API-Key header. Keys are issued from the dashboard and start with sc_live_.

curl "https://socialcard-api.reevine1331.workers.dev/v1/image?template=minimal&title=Hello&api_key=sc_live_xxx" -o card.png

Parameters

NameTypeRequiredDescription
templatestringyesOne of: blog-post, saas-product, news-article, portfolio, minimal.
titlestringyesHeadline. Max 200 characters. Japanese supported.
api_keystringyesYour sc_live_… key.
subtitlestringnoSubheading or eyebrow text. Optional.
authorstringnoAuthor name shown in templates that have a byline area.
datestringnoFree-form date string (e.g. "2026-05-04").
bgColorstring (hex)noOverride background color. Default varies per template.
textColorstring (hex)noOverride main text color.
accentColorstring (hex)noOverride accent / brand color.
widthintegernoOutput width. 200 ≤ value ≤ 4096. Default 1200.
heightintegernoOutput height. 200 ≤ value ≤ 4096. Default 630.
formatstringnopng | jpeg | webp. Default png. (jpeg / webp may not be supported in all builds.)

Use as og:image

<meta property="og:image"
  content="https://socialcard-api.reevine1331.workers.dev/v1/image
    ?template=blog-post
    &title=Hello+World
    &author=Ebine
    &api_key=sc_live_xxxxx" />

Caching

Identical requests (same params, same plan) return the same PNG from R2. The response includes X-Cache: HIT or X-Cache: MISS. Free-plan responses include a small watermark; Pro and above do not.

Rate limits

  • Free — 50 images / month
  • Pro — 1,000 images / month ($9/mo)
  • Business — 10,000 images / month ($29/mo)
  • Enterprise — 100,000 images / month ($99/mo)

Quota resets on the 1st of each month at 00:00 UTC. When you hit your limit, the API returns 429 with an upgrade_url field.

Errors

{
  "error": "Monthly limit reached",
  "plan": "free",
  "used": 50,
  "limit": 50,
  "upgrade_url": "https://socialcard-web.vercel.app/dashboard/usage"
}

Support

Issues, feature requests: GitHub. Direct contact: reevine1331@googlemail.com.