API Documentation

One HTTP GET, 18 templates, PNG or SVG. Free, cached at the edge, no key required.

Overview

The ogimagex API renders social share images on the edge from a single GET request. Pick a template, pass parameters as query strings, and drop the resulting URL straight into your og:image meta tag.

Quick start

<meta property="og:image"
  content="https://ogimagex.xyz/api/public/og/simple?title=Hello+World&accent=%237c3aed" />
<meta name="twitter:card" content="summary_large_image" />

URL-encode # in hex colors as %23 and spaces as +. Anything else is standard query-string escaping.

Endpoint

GEThttps://ogimagex.xyz/api/public/og/{template}

Replace {template} with any name from the templates table.

Common parameters

Every template accepts these three. Template-specific parameters are listed per template below.

ParameterTypeDefaultDescription
wnumber1200Width in px (200–2400).
hnumber630Height in px (200–2400).
formatstringpng`png` or `svg`.

Templates & parameters

18 templates. Each entry lists its use-case tags and full parameter set. Only required parameters must be present — everything else has a sensible default.

simpleMinimal all-purpose cover — great as a default share image.

Also known as: default cover, landing page cover, launch announcement

LaunchLandingDefault
ParameterTypeDefaultDescription
title*stringPrimary headline.
descriptionstringSupporting one-liner under the title.
brandstringBrand/product name shown as small caps.
accentcolor#7c3aedHex accent color (URL-encode `#` as `%23`).
titleFontSizenumber110Title font size in px.
descriptionFontSizenumber52Description font size in px.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/simple?title=example&description=example&brand=example

blogCategory, headline, excerpt, author — full editorial layout.

Also known as: blog cover, article header, medium-style cover

ArticleBlog PostEditorial
ParameterTypeDefaultDescription
categorystringKicker/category label (e.g. `Engineering`).
title*stringArticle title.
excerptstringDek/summary shown under the title.
authorstringAuthor name.
metastringDate · read-time string (e.g. `Jun 5 · 5 min read`).
avatarurlAuthor avatar (inlined server-side).
accentcolor#0a0a0aAccent color.
titleFontSizenumber68Title font size.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/blog?category=example&title=example&excerpt=example

quotePull quote with attribution and optional avatar.

Also known as: pull quote, founder quote, testimonial card

QuoteTestimonialSocial Proof
ParameterTypeDefaultDescription
quote*stringQuote body.
authorstringPerson quoted.
handlestringTwitter/X handle or title.
avatarurlAuthor avatar.
accentcolor#f472b6Accent color.
quoteFontSizenumber64Quote font size.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/quote?quote=example&author=example&handle=example

statBig metric with label, trend, and caption.

Also known as: milestone card, kpi card, growth number

StatsMetricMilestone
ParameterTypeDefaultDescription
value*stringThe big number (e.g. `12,480`).
labelstringLabel above the value.
trendstringSmall trend line (e.g. `+18% this month`).
captionstringBottom caption.
brandstringBrand line.
accentcolor#22d3eeAccent color.
valueFontSizenumber150Value font size.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/stat?value=example&label=example&trend=example

testimonialGrid of up to four short customer quotes with names and roles.

Also known as: testimonial grid, customer quotes, launch social proof

TestimonialSocial ProofLaunch
ParameterTypeDefaultDescription
headingstringHeading above the grid.
quoteslistQuotes list. Separate quotes with `|`, fields within a quote with `||` — `quote||author||role`. Max 4.
brandstringBrand line.
accentcolor#10b981Accent color.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/testimonial?heading=example&quotes=example&brand=example

gridCentered headline over a grid backdrop — SaaS launch look.

Also known as: launch announcement, saas hero, product launch

LaunchSaaSProduct
ParameterTypeDefaultDescription
title*stringHeadline.
descriptionstringSub-headline.
brandstringBrand line.
accentcolor#22d3eeAccent color.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/grid?title=example&description=example&brand=example

changelogVersioned release notes with clean bullet items.

Also known as: release notes, version update, feature roundup

ReleaseChangelogUpdate
ParameterTypeDefaultDescription
version*stringVersion string (e.g. `v2.0`).
datestringRelease date.
titlestringRelease headline.
itemslistBullet items separated with `|` (max 4 shown).
brandstringBrand line.
accentcolor#34d399Accent color.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/changelog?version=example&date=example&title=example

photoFull-bleed photo with elegant overlay text.

Also known as: photo cover, travel post, photo essay

TravelPhotoStory
ParameterTypeDefaultDescription
image*urlFull-bleed photo URL.
labelstringKicker label.
titlestringOverlay title.
brandstringBrand line.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/photo?image=example&label=example&title=example

productProduct card with price tag and image.

Also known as: product card, pricing announcement, ecommerce drop

ProductEcommerceLaunch
ParameterTypeDefaultDescription
brandstringBrand line.
title*stringProduct name.
descriptionstringShort description.
pricestringPrice string (e.g. `$49`).
imageurlProduct image URL.
accentcolor#7c3aedAccent color.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/product?brand=example&title=example&description=example

profilePersonal card with avatar, role and short bio.

Also known as: author card, team member, speaker highlight

ProfileAuthorSpeaker
ParameterTypeDefaultDescription
name*stringPerson name.
rolestringRole/title.
biostringShort bio.
websitestringWebsite URL string.
avatarurlAvatar image URL.
accentcolor#7c3aedAccent color.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/profile?name=example&role=example&bio=example

eventDate + location front and center for time-based posts.

Also known as: webinar cover, meetup card, conference announcement

EventWebinarConference
ParameterTypeDefaultDescription
labelstringKicker label (e.g. `Live Event`).
brandstringBrand line.
title*stringEvent title.
datestringDate string (free-form).
locationstringLocation string.
accentcolor#f59e0bAccent color.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/event?label=example&brand=example&title=example

terminalCode/CLI-styled card in mono type.

Also known as: cli card, developer post, tutorial cover

DeveloperDocsCLI
ParameterTypeDefaultDescription
title*stringCommand or code line.
captionstringCaption below the command.
brandstringBrand line.
accentcolor#34d399Accent color.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/terminal?title=example&caption=example&brand=example

editorialMagazine-style layout with kicker and ghost type.

Also known as: magazine cover, essay header, long-form article

EssayEditorialLong-form
ParameterTypeDefaultDescription
kickerstringKicker label.
title*stringEssay title.
authorstringAuthor name.
metastringIssue/date meta.
ghoststringLarge ghost word behind title.
accentcolor#e11d48Accent color.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/editorial?kicker=example&title=example&author=example

showcaseBold centered title with URL for portfolios and case studies.

Also known as: portfolio card, case study cover, agency work

PortfolioCase StudyAgency
ParameterTypeDefaultDescription
title*stringProject title.
subtitlestringSubtitle line.
urlstringSmall URL shown at the bottom.
accentcolor#7c3aedAccent color.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/showcase?title=example&subtitle=example&url=example

podcastEpisode card with show, host, and duration.

Also known as: podcast cover, episode card, audio post

PodcastAudioEpisode
ParameterTypeDefaultDescription
showstringShow name.
episodestringEpisode number (e.g. `Ep. 28`).
title*stringEpisode title.
hoststringHost name.
durationstringDuration (e.g. `42 min`).
coverurlCover art image URL.
accentcolor#a855f7Accent color.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/podcast?show=example&episode=example&title=example

newsletterWarm editorial layout for issue-based newsletters.

Also known as: newsletter header, email digest, issue cover

NewsletterEmailDigest
ParameterTypeDefaultDescription
issuestringIssue number (e.g. `Issue #42`).
datestringPublish date.
title*stringIssue title.
summarystringShort issue summary.
brandstringPublication name.
accentcolor#f59e0bAccent color.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/newsletter?issue=example&date=example&title=example

courseCourse card with instructor, lesson count, duration and level.

Also known as: course promo, tutorial cover, lesson card

CourseTutorialEducation
ParameterTypeDefaultDescription
categorystringCourse category.
title*stringCourse title.
instructorstringInstructor name.
lessonsstringLesson count.
durationstringTotal duration.
levelstringDifficulty level.
accentcolor#0ea5e9Accent color.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/course?category=example&title=example&instructor=example

saas-proGradient-mesh SaaS card with feature pills, headline metric and CTA.

Also known as: saas launch card, product announcement, funding announcement

ProSaaSLaunch
ParameterTypeDefaultDescription
badgestringSmall badge above the title (e.g. `New in v3`).
brandstringBrand name in the header.
title*stringHeadline.
subtitlestringSupporting line.
featureslistFeature pills separated with `|` (max 3).
metricstringHeadline metric (e.g. `38ms`).
metricLabelstringLabel under the metric.
ctastringFooter CTA / URL.
accentcolor#6366f1Primary accent color.
accent2color#ec4899Secondary gradient color.
titleFontSizenumber72Title font size.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/saas-pro?badge=example&brand=example&title=example

course-proCourse card with numbered curriculum rail, level meter and price.

Also known as: cohort course card, bootcamp promo, paid tutorial cover

ProCourseEducation
ParameterTypeDefaultDescription
categorystringCourse category badge.
title*stringCourse title.
subtitlestringCourse subtitle.
moduleslistCurriculum items separated with `|` (max 4).
instructorstringInstructor name.
avatarurlInstructor avatar URL.
lessonsstringLesson count.
hoursstringTotal duration.
levelstringLevel — drives the level meter (beginner/intermediate/advanced).
pricestringPrice shown in the CTA bar.
accentcolor#0ea5e9Accent color.
titleFontSizenumber62Title font size.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/course-pro?category=example&title=example&subtitle=example

podcast-proEpisode card with cover art, waveform, guest credit and platforms.

Also known as: interview episode card, audio show cover, guest episode promo

ProPodcastEpisode
ParameterTypeDefaultDescription
showstringShow name.
episodestringEpisode label (e.g. `Ep. 42`).
title*stringEpisode title.
gueststringGuest name.
guestRolestringGuest role/company.
durationstringEpisode duration.
platformsstringPlatform row text.
coverurlCover art image URL.
accentcolor#a855f7Accent color.
titleFontSizenumber56Title font size.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/podcast-pro?show=example&episode=example&title=example

hiring-proJob post card with role, location, compensation and perk pills.

Also known as: job post card, we're hiring image, careers page cover

ProHiringCareers
ParameterTypeDefaultDescription
labelstringBadge text (e.g. `We're hiring`).
companystringCompany name.
role*stringRole title.
teamstringTeam · employment type.
locationstringLocation string.
salarystringCompensation range.
perkslistPerk pills separated with `|` (max 3).
ctastringFooter CTA / URL.
accentcolor#f97316Accent color.
roleFontSizenumber66Role font size.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/hiring-pro?label=example&company=example&role=example

changelog-proRelease notes with typed new / fix / improve entries on a version rail.

Also known as: typed release notes, product update card, version rail changelog

ProChangelogRelease
ParameterTypeDefaultDescription
version*stringVersion string.
datestringRelease date.
titlestringRelease headline.
itemslistEntries separated with `|`; each entry is `kind||text` where kind is `new`, `fix` or `improve`. Max 4.
brandstringBrand line.
ctastringFooter CTA / URL.
accentcolor#22c55eAccent color.
titleFontSizenumber54Title font size.
wnumber1200Output width in pixels (200–2400).
hnumber630Output height in pixels (200–2400).
formatstringpngOutput format: `png` or `svg`.
Example URL
https://ogimagex.xyz/api/public/og/changelog-pro?version=example&date=example&title=example

SDK snippets

No SDK required — it's just a URL. Use any HTTP client.

curl

curl -o cover.png \
  "https://ogimagex.xyz/api/public/og/blog?title=Rendering+OG+images+at+the+edge&author=Ada+Lovelace&accent=%237c3aed"

Node.js

import { writeFile } from "node:fs/promises";

function ogUrl(template, params) {
  const qs = new URLSearchParams(params).toString();
  return `https://ogimagex.xyz/api/public/og/${template}?${qs}`;
}

const res = await fetch(ogUrl("blog", {
  title: "Rendering OG images at the edge",
  author: "Ada Lovelace",
  accent: "#7c3aed",
}));

if (!res.ok) throw new Error(`ogimagex ${res.status}`);
await writeFile("cover.png", Buffer.from(await res.arrayBuffer()));

Python

import urllib.parse, urllib.request

def og_url(template, **params):
    qs = urllib.parse.urlencode(params)
    return f"https://ogimagex.xyz/api/public/og/{template}?{qs}"

url = og_url("blog",
    title="Rendering OG images at the edge",
    author="Ada Lovelace",
    accent="#7c3aed")

with urllib.request.urlopen(url) as res:
    with open("cover.png", "wb") as f:
        f.write(res.read())

Next.js / React (meta tags)

export const metadata = {
  openGraph: {
    images: [`https://ogimagex.xyz/api/public/og/simple?title=${encodeURIComponent(title)}`],
  },
  twitter: { card: "summary_large_image" },
};

Output formats

  • PNG (default): rasterised server-side, best for Open Graph and Twitter cards.
  • SVG: request with ?format=svg for vector output — ideal for design tools or further processing.

Caching

Responses are cacheable at every layer. The cache key is the full URL including query string, so changing any parameter invalidates the cache for that variant.

Cache-Control: public, max-age=3600, s-maxage=3600, stale-while-revalidate=86400
Access-Control-Allow-Origin: *

Rate limits

Public endpoint is limited to 60 requests per minute per IP using a sliding window. Every response returns the current bucket state — no key or auth required.

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 42
X-RateLimit-Reset: 1735689600
Retry-After: 17            # only sent on 429

Because responses cache for an hour, most integrations never come close to the ceiling — production CDN traffic hits your cache, not this endpoint. Need higher throughput? Get in touch.

Error codes

StatusMeaningHow to fix
200OKImage body in the response.
400Invalid parameterCheck `format`, `w`/`h` bounds, or overly long string (>1000 chars).
404Unknown templateTemplate name in the URL isn't one of the 18 supported names.
429Rate limitedWait `Retry-After` seconds, or cache responses on your side.
500Render failureUsually a malformed remote image URL. Retry without `image`/`avatar`/`cover`.

On PNG render failure the endpoint transparently falls back to SVG and sets X-OG-Format-Fallback: svg. Callers receive a 200 in that case — inspect the header if you need to detect it.

License & ownership

Images you generate with ogimagex are yours to use for personal or commercial projects with no attribution required — see the FAQ for the full statement.