apyhub
MARKETING · SMART GENERATION

Basic OG Image Generator API

Hosted on ApyHub

What it does

Open Graph Image Generator creates social preview images from JSON. Send a required title, and optionally add subtitle, description, bgColor, textColor, and accentColor to control the layout and branding of the card.

Use /download when you want the PNG file itself. Use /link when you want a signed URL to the uploaded image. Both endpoints generate the same Open Graph-style image, so you can choose the response shape that fits your publishing flow.

The title becomes the primary headline on the card. subtitle and description let you add supporting copy, while the color fields accept #RRGGBB values so you can match your brand palette. If you are generating share images for blog posts, product launches, docs pages, or invite links, this gives you a direct way to produce consistent preview assets from backend code.

Open Graph Image Generator is a good fit for CMS pipelines, social sharing workflows, and any app that needs predictable preview images without a manual design step.

▣ ENDPOINT 01 / 02
POST
Generate Open Graph image (download PNG)
http://localhost:8080/apyhub/generate-og-image/download
QUICKSTARTGUIDE

Quickstart

Generate an Open Graph image from a title and download the resulting file.

curl -X POST "http://localhost:8080/apyhub/generate-og-image/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title":"mono-go API"}'

What you'll get back

Returns a binary file (string with format: binary), not a JSON object.

TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Primary headline drawn on the card.
Background color as `#RRGGBB` (default `#111827`).
Optional secondary line drawn in the accent color.
Title text color as `#RRGGBB` (default `#F9FAFB`).
Accent bar and subtitle color as `#RRGGBB` (default `#3B82F6`).
Optional body text, word-wrapped (~55 chars/line).

About this endpoint

What it does

Generates an Open Graph image and returns it as a PNG download. You provide the card content and optional styling in the request body; the response is the binary image payload.

Request Body

ParameterTypeMandatoryDescription
titleStringYesPrimary headline drawn on the card.
bgColorStringNoBackground color as #RRGGBB (default #111827).
subtitleStringNoOptional secondary line drawn in the accent color.
textColorStringNoTitle text color as #RRGGBB (default #F9FAFB).
accentColorStringNoAccent bar and subtitle color as #RRGGBB (default #3B82F6).
descriptionStringNoOptional body text, word-wrapped at about 55 characters per line.

Response

Returns a binary string response containing the generated PNG image. The output schema is a single string with binary format, so there is no JSON wrapper or named response field to read.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 02
POST
Generate Open Graph image (signed URL)
http://localhost:8080/apyhub/generate-og-image/link
QUICKSTARTGUIDE

Quickstart

Generate an Open Graph image URL from a title and save the result to a PNG link.

curl -X POST "http://localhost:8080/apyhub/generate-og-image/link" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title":"mono-go API"}'

What you'll get back

Returns a JSON object with a data string field containing the pre-signed PNG URL.

{
  "data": "https://apyhub-outgoing.s3.eu-west-1.amazonaws.com/mono-go/og_image_generator/general/og_image_generator_2026-08-10_d6b8f2ee.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIARJOHWS6LWTUUGYPI%2F20260810%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20260810T140607Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&response-content-disposition=inline&response-content-type=image%2Fpng&X-Amz-Signature=01dec36a7fb4b0184e2310ba2002fd68eb9757676919e405df845599b3806af6"
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Primary headline drawn on the card.
Background color as `#RRGGBB` (default `#111827`).
Optional secondary line drawn in the accent color.
Title text color as `#RRGGBB` (default `#F9FAFB`).
Accent bar and subtitle color as `#RRGGBB` (default `#3B82F6`).
Optional body text, word-wrapped (~55 chars/line).

About this endpoint

What it does

Generates an Open Graph image from the request body fields and returns a JSON object containing a pre-signed URL to the generated PNG.

Request Body

ParameterTypeMandatoryDescription
titleStringYesPrimary headline drawn on the card.
bgColorStringNoBackground color as #RRGGBB or #RRGGBB without the leading #; defaults to #111827.
subtitleStringNoOptional secondary line drawn in the accent color.
textColorStringNoTitle text color as #RRGGBB or #RRGGBB without the leading #; defaults to #F9FAFB.
accentColorStringNoAccent bar and subtitle color as #RRGGBB or #RRGGBB without the leading #; defaults to #3B82F6.
descriptionStringNoOptional body text, word-wrapped at approximately 55 characters per line.

Response

Returns a JSON object with a data string field containing a URI. The data value is the pre-signed URL of the uploaded PNG.

ParameterTypeMandatoryDescription
dataStringYesPre-signed URL of the uploaded PNG.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.