---
title: "Social card generator"
method: POST
path: "/api/og/card"
tags: ["SEO & Publishing"]
---

# Social card generator

`POST /api/og/card`

## Request

- Base URL: `https://api.webbersites.com`
- URL: `https://api.webbersites.com/api/og/card`
- Auth: API key in header `X-PAYMENT`

Social card generator: POST {title, subtitle, domain, theme, accent} and receive a finished 1200x630 OpenGraph card — PNG (base64) plus the source SVG. Three themes (dark, light, midnight), custom accent color, automatic text wrapping. Pairs with /api/og/check: check the page, then generate the missing card.

Price: $0.02 per call, paid in USDC via the x402 protocol (see the x402 security scheme).

## Request body

- object
  - `title` string, required: Card headline (required, wraps to 3 lines, max 140 chars)
  - `subtitle` string: Smaller supporting line (optional)
  - `domain` string: Shown bottom-left in accent color (optional)
  - `theme` string: dark (default), light, or midnight
  - `accent` string: Hex accent color override, e.g. #ff6b35

## Response `200`

Success

- object
  - `width` number
  - `height` number
  - `svg` string
  - `png_base64` string
  - `data_uri` string

## Other responses

- `402`: Payment required — the response body lists accepted payment methods (amount, asset, network, pay-to address). Retry the request with a signed X-PAYMENT header.

---

[API](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api.md) · [All operations](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api/revisions/c14a76c67a94?raw)
