Skip to main content
The ogis API is a simple HTTP endpoint that generates Open Graph images from query parameters.

Base URL

EnvironmentURL
Public Hostedhttps://img.ogis.dev
Self-HostedYour instance URL

Generate Image

GET /

Generate an Open Graph image

Query Parameters

ParameterTypeRequiredDescription
titlestringNoMain heading text
descriptionstringNoSecondary text below title
subtitlestringNoSmall text above title
templatestringNoTemplate name (default: twilight)
logostringNoURL to logo image
imagestringNoURL to background/hero image
signaturestringNo*HMAC signature (required if auth enabled)

Response

Returns a PNG image with dimensions 1200x630 pixels.
  • Content-Type: image/png
  • Status: 200 OK

Example Request

curl "https://img.ogis.dev/?title=Hello%20World&template=twilight" \
  --output og-image.png

Example with SDK

import { OgisClient } from 'ogis';

const ogis = new OgisClient({ baseUrl: 'https://img.ogis.dev' });

const url = ogis.generateUrl({
  title: 'Hello World',
  description: 'My first Open Graph image',
  template: 'twilight'
});

OpenAPI Specification

The full OpenAPI specification is available at:
https://img.ogis.dev/docs/openapi.json

Health Check

GET /health

Check service health

Response

  • Status: 200 OK — Service is healthy
  • Status: 503 Service Unavailable — Service is not ready
curl https://img.ogis.dev/health

Error Responses

StatusDescription
400 Bad RequestInvalid parameters
401 UnauthorizedMissing or invalid signature (when auth enabled)
413 Payload Too LargeText exceeds maximum length
500 Internal Server ErrorImage generation failed

Rate Limiting

The public hosted service at img.ogis.dev has rate limiting enabled. For high-volume usage, consider self-hosting.