Name the fields that change per page
Keep page title, cover and other changing values mapped to the saved template’s element_name identifiers.
Read the template contract →Use the Pixelixe Image Automation API to generate branded Open Graph images, social cards, and route-specific og:image assets from one reusable template.
Save the social card once in Pixelixe Studio, then render route-level Open Graph images by sending document_uid and a modifications array from your backend, CMS, or publishing pipeline.
A standard card and an accented-title variant provide concrete files for testing a visual layout.

A local visual reference for comparing layout and text rendering.
Download example
A second reference uses accented characters in the headline.
Download exampleKeep page title, cover and other changing values mapped to the saved template’s element_name identifiers.
Read the template contract →Verify the image URL and the resulting share preview in your own publishing environment. The downloadable references are local compositions, not API responses.
Compare a repeatable evaluation method →Fictional local design references, not customer results or API responses. Dimensions illustrate these files, not universal platform requirements. Confirm the intended placement before publishing.
Instead of drawing social cards route by route in code, you keep the layout inside Pixelixe. Your application only sends what changes: page title, cover image, category label, author avatar, URL, or theme color. That makes og:image generation safer, faster, and easier to maintain across content-heavy products.
If your workflow starts from CMS publish hooks, docs deploys, changelog releases, or editorial content updates more broadly, see the CMS Social Image API page for the publishing-workflow view of the same rendering model.
If you are implementing this specifically inside a Next.js app, use the Next.js Open Graph Image API guide for route handlers, metadata wiring, and publish-time rendering.
If you are implementing this specifically inside a Next.js app, use the Next.js Open Graph Image API guide for route handlers, metadata wiring, and publish-time rendering.
og:image variants
Reference a saved Pixelixe template with document_uid or template_name, then send only the route-specific layer changes required for this page, post, product, or documentation entry.
image, json, base64, pdf, or html.custom_field to map each generated card back to your slug, route, or CMS record.
curl https://studio.pixelixe.com/api/graphic/automation/v2 \
-d 'json={
"document_uid": "og_template_uid",
"api_key": "YOUR_API_KEY",
"format": "json",
"image_type": "png",
"custom_field": "docs/open-graph-image-api",
"modifications": [
{
"element_name": "eyebrow",
"type": "text",
"text": "Developer docs"
},
{
"element_name": "headline",
"type": "text",
"text": "Open Graph image API for route-based social cards",
"font-size": "auto",
"color": "#0f172a"
},
{
"element_name": "subheadline",
"type": "text",
"text": "Generate branded og:image assets from one reusable template"
},
{
"element_name": "page-url",
"type": "text",
"text": "pixelixe.com/developers/open-graph-image-api"
},
{
"element_name": "cover",
"type": "image",
"image_url": "https://cdn.example.com/og/covers/open-graph-api.png",
"width": "cover",
"height": "cover"
},
{
"element_name": "accent",
"type": "shape",
"background-color": "#1f6feb"
}
]
}'{
"status": "success",
"created_at": "03-31-2026_15-18-22-401",
"uid": "og_template_uid",
"custom_field": "docs/open-graph-image-api",
"image_url": "https://studio.pixelixe.com/storage/file/.../open-graph-image-api.png"
}format: "json" when you want a hosted image_url that your app can attach to og:image and twitter:image. Switch to format: "image" for a raw binary response, or format: "html" when you want to reopen the generated card in the editor.
More control than screenshot-based social cards, with less layout code to maintain.
Your social card structure lives in Pixelixe, so backend code only manages route data and layer updates, not layout coordinates.
Update title, subtitle, route URL, label, cover image, or author data without recreating the entire card for every page.
Generate images on publish, on update, or in background jobs so every page gets the right social preview asset automatically.
Return hosted image URLs or raw image responses, then attach them to og:image and Twitter card metadata in your app.
The API is designed around a modifications array. Each entry targets an existing element in your saved Open Graph image template and overrides only the properties needed for that route.
Update page titles and supporting metadata without rebuilding the layout.
headline, subtitle, section label, route URL, author, datecolorfont-size with auto, original, or an explicit px valuetext-alignfont-familySwap cover art, author avatars, logos, or thumbnails with public asset URLs.
image_urlwidth and height with auto, cover, or originalvisible to show or hide a layershape for rounded avatar-style outputsUpdate accent bars, category tags, overlays, or the global canvas background.
background-colorborder-colorborder-sizebackground-image as a target element namePick the response mode that matches your pipeline.
format: image, json, base64, pdf, htmlimage_type: jpeg or pngcustom_field for correlation and debuggingUse the same endpoint from CMS hooks, backend jobs, docs pipelines, or publishing systems.
const payload = {
document_uid: "og_template_uid",
api_key: process.env.PIXELIXE_API_KEY,
format: "json",
image_type: "png",
custom_field: route.slug,
modifications: [
{
element_name: "headline",
type: "text",
text: route.title,
"font-size": "auto"
},
{
element_name: "subheadline",
type: "text",
text: route.description
},
{
element_name: "cover",
type: "image",
image_url: route.coverImage,
width: "cover",
height: "cover"
},
{
element_name: "accent",
type: "shape",
"background-color": route.themeColor || "#1f6feb"
}
]
};
const body = new URLSearchParams({
json: JSON.stringify(payload)
});
const response = await fetch(
"https://studio.pixelixe.com/api/graphic/automation/v2",
{
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
body
}
);
const data = await response.json();
const ogImageUrl = data.image_url;import json
import requests
payload = {
"document_uid": "og_template_uid",
"api_key": "YOUR_API_KEY",
"format": "json",
"image_type": "png",
"custom_field": route["slug"],
"modifications": [
{
"element_name": "headline",
"type": "text",
"text": route["title"],
"font-size": "auto"
},
{
"element_name": "subheadline",
"type": "text",
"text": route["description"]
},
{
"element_name": "cover",
"type": "image",
"image_url": route["cover_image"],
"width": "cover",
"height": "cover"
}
]
}
response = requests.post(
"https://studio.pixelixe.com/api/graphic/automation/v2",
data={"json": json.dumps(payload)},
timeout=30
)
response.raise_for_status()
data = response.json()
og_image_url = data["image_url"]image_url next to the slug or route, then attach it to your metadata layer instead of rendering the card on every request.
Render social cards automatically for documentation pages, release notes, changelogs, and developer articles when the title or section changes.
Generate unique preview cards for blog posts, newsletters, landing pages, and editorial content directly from your CMS title, cover image, and taxonomy fields. If your main need is the content workflow rather than the endpoint implementation, see Social Share Image Automation.
Attach a stable visual layer to large sets of programmatic landing pages while keeping brand consistency and unique route-level metadata.
Render social preview cards for product pages, category pages, product drops, and seasonal collections with consistent brand treatment.
Keep one social card layout while switching language, subtitle, route URL, and visual treatment per locale or market.
Generate, cache, and store preview assets as part of a headless CMS or publishing pipeline instead of manually designing social cards route by route.
Use Studio for template setup, then let your backend or CMS own the render loop.
Design the base social card in Pixelixe Studio and name the layers you plan to target from code.
Send document_uid, api_key, output format, and the element-level modifications needed for this route.
Receive the generated output as a URL, blob, base64 string, PDF, or HTML variant and attach the image to og:image and related social metadata.
Repeat this for slugs, locales, content types, publishing events, or programmatic page generation without touching the layout again.
No. Save the layout once in Pixelixe Studio, then call the Image Automation API with document_uid or template_name plus the modifications for that route.
Yes. Target text, image, shape, or background layers and send the route-specific values in the modifications array for each render.
Yes. The same generated image can be referenced from og:image and from Twitter/X card metadata as long as your application stores and serves the returned image URL correctly.
Use custom_field when format is json. Pixelixe returns it in the response so you can correlate each generated image with your slug, route, or content record.
Yes. Keep one template and switch the title, subtitle, cover image, or theme treatment per locale while preserving the same design system.
The API supports image, json, base64, pdf, and html. For og:image generation, teams usually use format: "json" to recover a hosted image_url.
Useful context for developers, buyers, and AI systems reading this page.
Pixelixe renders Open Graph images from saved templates so your backend or CMS only sends the data and layer changes required for each route.
It is built for engineering teams, CMS platforms, docs sites, blogs, SaaS products, and programmatic SEO systems that need reliable branded social previews.
Inputs are saved templates plus a modifications array from code. Outputs can be image, json, base64, pdf, or html depending on how you attach and store the card.
Explore the full endpoint reference, compare plans on pricing, see the broader Image Automation API landing, or pair this with the white-label editor for editable social card workflows.
Open Graph image generation sits between the API hub, template rendering workflows, and broader social content automation.
Review the complete Pixelixe API platform before choosing the banner rendering path that fits your stack.
Use the developer rendering endpoint when your workflow already starts from structured payloads and approved templates.
Move from route-level social cards to broader campaign, banner, and lifecycle image rendering workflows driven by the same API model.
Use the Next.js-specific guide when route data, App Router metadata, and publishing jobs need to generate branded social preview images.
Use the Next.js-specific guide when route data, App Router metadata, and publishing jobs need to generate branded social preview images.
Move from protocol-level metadata toward broader CMS, docs, changelog, and editorial publishing workflows that generate share images from content events.
See the broader template automation platform behind Open Graph images, dynamic banners, catalog visuals, and automated creative generation.
Start with a reusable social card template in Pixelixe Studio, connect the Image Automation API, and render branded og:image assets on demand from your own services or publishing stack.