Build an Open Graph card
build_open_graphRender one of the Open Graph templates as a PNG and a Next.js opengraph-image.tsx file. Pass a template id from list_og_templates, the fields that template uses, colors, a size, and optional base64 images.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cta | No | ||
| url | No | ||
| date | No | ||
| hero | No | Hero image as base64, a data URI, or a public URL. | |
| logo | No | Logo image as base64, a data URI, or a public URL. Private addresses are refused. 10 MB cap. | |
| meta | No | ||
| role | No | ||
| size | No | 1200x630 | |
| stat | No | ||
| time | No | ||
| after | No | After image as base64, a data URI, or a public URL. | |
| badge | No | ||
| brand | No | Brand name shown on templates that have a brand row. | |
| price | No | ||
| quote | No | ||
| steps | No | One step per line. | |
| title | No | ||
| author | No | ||
| avatar | No | Portrait image as base64, a data URI, or a public URL. | |
| before | No | Before image as base64, a data URI, or a public URL. | |
| colors | No | ||
| caption | No | ||
| command | No | ||
| episode | No | ||
| eyebrow | No | ||
| imageUrl | No | Public URL written into og:image. This does not fetch the file. | |
| readTime | No | ||
| subtitle | No | ||
| template | No | Template id from list_og_templates. | editorial |
| versions | No | One version per line, as v2.3 | Note. | |
| statLabel | No | ||
| afterValue | No | ||
| beforeValue | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| png | Yes | PNG bytes, base64 encoded. | |
| width | Yes | ||
| height | Yes | ||
| source | Yes | ||
| metaTags | Yes | ||
| mimeType | Yes | ||
| template | Yes |