Dyn-Image API

Dynamic Open Graph Image Generator Service

GET

/generate-image

Generates a dynamic image with a customizable title, date, and background.

Parameters

Parameter Type Description
title String Main heading text (e.g. "Event Name").
date String Subtitle or date text (e.g. "Oct 24, 2025").
bg Number Optional. Background ID (1-5). Random if omitted.
d Base64 JSON Optional. Base64 encoded JSON string with keys {title, date, bg}. Use this for complex text with special characters.

Usage Examples

Standard Query Params:

GET /generate-image?title=Hello+World&date=2024&bg=1

Try Live Demo →

Base64 Encoded (Recommended for special chars):

// client-side js
const payload = { title: "Café & Music", date: "Tonight!", bg: 2 };
const d = btoa(encodeURIComponent(JSON.stringify(payload)));
// request: /generate-image?d=...
GET

/backgrounds

Retrieve the list of available background image assets.

Response Format

{
  "backgrounds": [
    { "id": 1, "url": "..." },
    { "id": 2, "url": "..." }
  ]
}

View Backgrounds JSON →