ForHosting KIT · Images

Open Graph images

Feed a template plus per-page data into our Open Graph image API and get back a rendered social card sized for link previews on every major platform. It exists so that a blog post, a product page, or a job listing does not have to share the same generic banner image every time someone pastes its link.

● StablePer request + per image$0.040
Use it from WebAPIEmailApp soonTelegram soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

The problem with static share images

For years, the easy path was one static image reused across an entire site's Open Graph tags, which meant every article, every product, and every landing page looked identical when shared in a chat or social feed. That flattens exactly the content that should stand out. POST /image/og exists to render a distinct card per page, pulling in the title, a snippet, or a price at generation time instead of at design time.

How a card gets built

You submit a template reference along with the dynamic values for that specific page, the task is queued asynchronously and returns a task_id immediately, and the finished image is delivered by signed webhook or a signed link valid for 24 hours once rendering completes. That flow keeps page generation fast, since your app never waits on image rendering to finish a response.

Where the Open Graph protocol comes from

Open Graph tags were introduced in 2010 to let any web page describe itself as a rich object when shared on social platforms, standardizing the title, description, and image that a link preview should show. Fifteen-plus years later, that same og:image tag still drives the preview card on chat apps, social feeds, and messaging platforms, which is exactly why a wrong or generic image there is such a visible, wasted opportunity.

Fitting it into a publishing pipeline

Because the endpoint takes a template and data rather than a hand-designed image, it plugs neatly into a CMS's publish hook: whenever a post, product, or event is created or updated, trigger a render, store the returned image, and update the page's og:image tag before the next crawl or share. No designer has to touch each individual page.

What determines the final look

The card's design comes entirely from the template you provide — the endpoint renders your layout with your data, it does not invent design decisions. That keeps output predictable and on-brand across hundreds or thousands of generated cards, rather than producing a look that drifts from page to page. If you maintain templates for different content types — an article layout, a product layout, an event layout — you can route each page to the matching template and still get consistent, on-brand output from a single endpoint.

Blog and news publishing

Render a card showing each article's headline and hero image the moment it's published, instead of one shared banner site-wide.

E-commerce product pages

Generate a card with the product photo, name, and current price so shared product links preview accurately.

Job boards and listings

Produce a distinct card per job posting with the role title and company so shared listings stand out in a feed.

Event and webinar pages

Create a card with the event name, date, and speaker for each event page as it goes live.

How does the Open Graph image API generate a card?

You send a template and page-specific data to POST /image/og; it returns a task_id immediately and delivers the rendered image afterward via webhook or a signed link valid for 24 hours.

Is generating OG images free?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

What's the cost per OG image?

Each request is $0.040 plus $0.001 per image rendered, and you're only billed when a card is successfully generated.

Can I design my own template?

Yes, the rendered card reflects whatever template and layout you provide; the API fills it with your dynamic data rather than imposing a fixed design.

What size are the generated images?

Cards are rendered at the dimensions expected for standard link-preview og:image usage across major sharing platforms.

Am I charged if a render fails?

No. A failed render is retried automatically up to three times and never billed if it doesn't ultimately succeed.

Can I generate OG images in bulk for an entire catalog?

Yes, since each call is asynchronous and independent, you can queue a render for every product, post, or listing in a catalog and track each by its own task_id.

How is this different from a static og:image?

A static image is the same file for every page; this renders a unique card per page from live data, which is the whole point when content varies but the share image traditionally didn't.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/image/og

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/image/og \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"image":"https://ejemplo.com/imagen.jpg"}'
{
  "image": "https://ejemplo.com/imagen.jpg"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "image.og",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.040
Per image$0.001

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb15
max_megapixels12
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.
422task_failedThe task failed after 3 retries. You are never charged for it.

Read the full KIT documentation →