---
title: Dynamic OG Image API
slug: dynamic-og-image-generation
url: https://apyhub.com/chisleroff/service/dynamic-og-image-generation
provider: Website Intelligence
categories: [Output Kit]
tags: [og-image, open-graph, image-generation, social-preview, branding]
auth: api_key
version: 1.0.0
service_type: sync
endpoints: 1
atoms: 50
alias: chisleroff-dynamic-og-image-api
---

# Dynamic OG Image API

Generate Open Graph images from title and styling fields. Returns a binary image for blog posts, product pages, and social sharing cards.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/chisleroff/dynamic-og-image-generation` | What it does Generates a dynamic Open Graph image from the provided body fields and returns the ima… | 50 |

## Endpoint reference

### Dynamic OG Image Generation

`POST https://api.eu.apyhub.com/chisleroff/dynamic-og-image-generation` · 50 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `tag` | body | string | no | Tag/label pill text. |
| `title` | body | string | yes | Main headline for the OG image. |
| `author` | body | string | no |  |
| `domain` | body | string | no | Domain name to display. |
| `bg_color` | body | string | no | Hex background color. Default: `#1a202c`. |
| `subtitle` | body | string | no | Subtitle text. |
| `template` | body | string | no | One of: blog, minimal, bold, card. Default: `blog`. |
| `background` | body | string | no | One of: solid, gradient, gradient_horizontal, gradient_vertical, pattern, mesh. Default: `solid`. |
| `text_color` | body | string | no | Hex text color. Default: `#ffffff`. |
| `accent_color` | body | string | no | Hex accent color (auto-derived if omitted). |
| `reading_time` | body | string | no | Reading time label. |

#### Quickstart

Generate an OG image by sending the required `title` field in a JSON body.

```bash
curl -X POST "https://api.eu.apyhub.com/chisleroff/dynamic-og-image-generation" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "How to Build APIs with FastAPI",
  "subtitle": "A complete guide to building production-ready APIs",
  "bg_color": "#4f46e5",
  "template": "blog",
  "background": "gradient",
  "author": "Jane Doe",
  "domain": "blog.example.com",
  "reading_time": "8 min read",
  "tag": "Tutorial"
}'
```

#### What you'll get back

Returns a binary file containing the generated image.

## About

## What it does
Dynamic OG Image Generator creates Open Graph images from a single request. Send a title and optional styling fields, and you get back a binary image you can use for social previews, link cards, and blog sharing.

Use the `body` object to set the main `title` and, if needed, `tag`, `subtitle`, `author`, `domain`, and `reading_time`. You can also control the look with `template`, `background`, `bg_color`, `text_color`, and `accent_color`. The service supports blog, minimal, bold, and card layouts, plus solid, gradient, horizontal gradient, vertical gradient, pattern, and mesh backgrounds.

This is a good fit when you need consistent preview images without generating them in your app or hand-designing each one. For example, you can create share images for new articles, product pages, or docs pages from the same endpoint and keep the styling aligned across your site.

Dynamic OG Image Generator returns the image as a binary response, so you can store it, serve it directly, or feed it into your publishing pipeline.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/chisleroff/service/dynamic-og-image-generation
