docs / get /api/og/check

GET /api/og/check

Edge-runtime image endpoint. Renders a 1200×630 PNG suitable for <meta property="og:image"> — branded, legible, and based on whatever data you pass.

When someone shares an OrangeCheck proof URL on Nostr, Twitter, Discord, or Slack, this endpoint is what produces the rich preview card.

GET https://ochk.io/api/og/check?addr=bc1q...&sats=125000&days=47

Query parameters

ParamTypeNotes
addrstringBitcoin address. Shown truncated.
idstringAttestation ID. Used when addr not supplied.
satsintSats bonded. Renders a "Bonded" column when present.
daysintDays unspent. Renders an "Unspent" column when present.

All parameters are optional; the card degrades gracefully.

Output

  • Format: PNG, 1200×630
  • Content-Type: image/png
  • Cache-Control: public, max-age=300, s-maxage=300
  • Runtime: Edge (satori-based)

Examples

Inline HTML

<meta property="og:image"
      content="https://ochk.io/api/og/check?addr=bc1q...&sats=125000&days=47">
<meta property="og:image:width"  content="1200">
<meta property="og:image:height" content="630">

Next.js SEO component

<Seo
  title="My OrangeCheck proof"
  description="..."
  ogImage={`https://ochk.io/api/og/check?addr=${addr}&sats=${sats}&days=${days}`}
/>

As a badge on any page

<img
  src="https://ochk.io/api/og/check?addr=bc1q..."
  alt="OrangeCheck proof"
  width="600"
/>

Behavior notes

  • Runs on the Edge. First request compiles the image on satori; subsequent requests within the cache window return immediately.
  • No data fetching. The endpoint renders the parameters you give it — it does NOT query Nostr or chain state. Pass real values from wherever you have them (e.g. a /api/check call, or the signed message's bond: extension).
  • Missing metrics. If sats and days are omitted, the card shows only the address/ID and branding.

Customization

This endpoint renders the OrangeCheck-branded card. For a custom-styled badge that matches your own site, use the @orangecheck/react package's <OcBadge> component client-side.

Status codes

HTTPMeaning
200PNG rendered.
500Render failed.

Rate limits are generous (edge-cached) and not separately enforced.