OG image generator
Try it interactively →POST /api/og-image-generateGenerate Open Graph (og:image) share-card images dynamically. Configurable title, subtitle, theme, and accent colour. 1200×630 default — the standard OG size.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| title* | string | — | Big headline (1–200 chars). |
| subtitle | string | — | Optional subhead under the title (max 300 chars). |
| brand | string | — | Optional brand label rendered bottom-left (max 64 chars). |
| background | string | "#0f172a" | Background colour (CSS hex, e.g. #0f172a). |
| accent | string | "#0ea5e9" | Accent colour for the rule + brand mark. |
| titleColor | string | "#ffffff" | Title text colour. |
| subtitleColor | string | "#cbd5e1" | Subtitle text colour. |
| width | number (200…4000) | 1200 | Output width in px. 1200 = OpenGraph standard. |
| height | number (200…4000) | 630 | Output height in px. 630 = OpenGraph standard. |
Response
Modes: binary, base64-json. Cache: yes (24h TTL).
Code samples
Built from the default example.
curl -X POST https://api.xtract.bot/api/og-image-generate \
-H "Content-Type: application/json" \
-H "Accept: application/octet-stream" \
-H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
-H "X-Api-Key: $XTRACT_API_KEY" \
-d '{
"title": "xtract.bot — file conversion API for developers"
}'