Skip to content

Ship OG Images via API

Hit one endpoint per URL and get a share-ready PNG back — currently invite-only while we harden the contract with the first teams shipping against it.

POST · oginify.com/api/og
curl -X POST https://oginify.com/api/og \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}' \
  --output card.png
HTTP 200 · image/png1200 × 630 · og:image

What You Can Call

Three endpoints cover the loop most teams need — generate, validate, iterate.

Generate from URL

POST a page URL, get back a 1200×630 PNG generated by the same Firecrawl → LLM → image pipeline that powers oginify.com.

Generate from prompt or image

Text-to-OG and image-to-OG variants for marketing pages, launches and AI-driven content where there's no URL to scrape yet.

Validate any URL

Score Open Graph and Twitter Card tags on any page, return per-platform previews and a list of fixes — same engine as the public Validator.

How to Generate Open Graph Images via API

One POST per URL, one PNG back. The same Firecrawl to LLM to image pipeline that powers oginify.com, wrapped in a versioned HTTP contract.

  1. Step 1

    Send a POST Request

    Hit POST /v1/og with a bearer key and a JSON body containing a url or prompt. Rate-limited at 60 requests per minute.

  2. Step 2

    We Read, Paint and Bake

    Firecrawl scrapes the page, an LLM extracts brand, tagline, palette and page type, and a Gemini-grade model paints one on-brand card plus three wildcards.

  3. Step 3

    Retrieve the PNG URL

    Get back a JSON response with a strict 1200×630 PNG on our CDN, cached for 365 days. Optional webhook for async pipelines.

Who It's For

Headless CMS

Auto-generate og:image on publish for Sanity, Contentful, Payload — without maintaining a Satori template per content type.

CI / build pipelines

Regenerate cards as part of a deploy: hit the API per changed slug, write the PNG to your CDN, ship.

SaaS dashboards

Give your users branded share cards for the pages they create — invoices, reports, public profiles.

AI agents & MCP

A drop-in tool for autonomous agents that publish content. Pairs with our open-source Skills repo for prompt-side guidance.

Tech & Limits

Authentication

Bearer tokens issued per workspace. Test and live keys are separated; rotate at any time.

Format

JSON in, JSON out. PNG is returned as a hosted URL (1200×630), or inline base64 on request.

Latency

Typically 8–15 seconds end-to-end per card. Cache-friendly — repeat URLs return instantly.

Rate limits

Tuned per workspace during private beta. We'll publish public tiers when the API leaves beta.

Reliability

Runs on the same edge stack as oginify.com. Idempotent by URL — safe to retry.

What Teams Build on the API

One POST returns a 1200×630 PNG plus a hosted URL — wire it into the build, the CMS or the app runtime.

Publish hook

Fire on Save from Any CMS

Call the endpoint from a WordPress, Sanity or Contentful publish hook, store the returned URL as og:image alongside the post row.

Build step

Generate at Deploy, Not at Request

Run the API inside CI so every route ships with its card baked in — no runtime latency, no cold-start blank previews.

Per-route automation

Cover Every URL Without Editorial Work

Iterate the sitemap, call the API per slug, cache the PNG by content hash — new pages get a card the minute they're indexed.

Frequently Asked Questions

REST endpoint, authentication, rate limits and how to wire Oginify into a CMS webhook.

How do I generate an Open Graph image programmatically from an API?

POST your target page URL to https://api.oginify.com/v1/og with a Bearer token; the response returns four signed CDN URLs for the four cards, ready to reference in your <meta property="og:image"> tag. A single call, one URL in, four PNGs out.

Where do I get an API key and is it free to try?

Any signed-in account can mint an API key from Settings → API. Free-tier keys share the same 6-images-per-day quota as the web app; paid plans lift the limit to the plan's monthly quota with no per-key cap.

What is the API rate limit and how is throttling handled?

60 requests per minute per key, burstable to 120 for 10 seconds. Over the limit returns 429 with a Retry-After header in seconds. Generation itself is async — the endpoint returns in ~200ms with a job id; the CDN URLs become 200 OK when the render completes (~15–30s).

How do I trigger card generation from a CMS on publish?

Point your CMS's publish webhook (WordPress, Ghost, Sanity, Contentful and Notion all support outbound webhooks) at a small handler that forwards the post URL to the Oginify API and writes the returned og:image URL back into the post's meta fields. End-to-end latency is under a minute per post.

Can I self-host or run Oginify on my own infrastructure?

The rendering pipeline uses a proprietary model stack, so a self-hosted binary isn't shipped. For teams that need images to stay inside their own network, we offer a dedicated-tenant deployment on request; email hello@oginify.com with rough monthly volume.

Which image formats and sizes does the API return?

PNG at strict 1200×630 by default (the Open Graph large-card spec). Pass ?format=jpg or ?format=webp for the same dimensions in the other formats — useful for LinkedIn (which prefers JPG under 5MB) or bandwidth-sensitive AMP pages.

Wire Oginify Into Your Build Pipeline

Same endpoint powering the demos on this page — one POST per URL, 1200×630 PNG back, cached on the edge for a year. Keys go out by email, usually same day.