OG Image API Reference
The OG image API reference covers every endpoint, parameter, and template for generating dynamic Open Graph images with FastOG. The API is credit-based — you pay per render — and HMAC-signed URLs keep each request secure. Sign up free for 100 credits, then create your API key and HMAC secret in the dashboard; renders carry a FastOG watermark until your first payment. Copy an example, hit the endpoint, and ship.
Base URL
https://fastog.com/api/v1/ogAuthentication
All requests require HMAC-SHA256 signature authentication. See the HMAC Documentation for details.
Endpoint
GET /api/v1/og
Generates a dynamic Open Graph image based on the provided parameters.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
template | string | No | Template name (default: default) |
title | string | No | Main title text |
subtitle | string | No | Subtitle or description text |
key | string | Yes | Full API key |
s | string | Yes | HMAC-SHA256 signature (64 hex chars) |
t | number | Yes | Unix timestamp in seconds |
Template-Specific Parameters
Every template accepts the shared parameters below plus its template-specific parameters (see the index table). The template query parameter selects which layout is used (default: default).
| Parameter | Type | Description |
|---|---|---|
title | string | Main heading text |
subtitle | string | Supporting text |
tags | list | Comma-separated tag labels |
theme | string | dark | light | glass |
gradient_preset | string | Named gradient preset (e.g. indigo, ocean, sunset, cosmic) |
gradient_direction | number | Gradient angle in degrees (default 135) |
bg_color | hex | Solid background color |
pattern | string | Background pattern (grid, dots, noise, none, …) |
pattern_color | hex | Pattern color |
pattern_intensity | number | Pattern opacity (1–30) |
font_family | string | font-sans, font-jakarta, font-dm, font-outfit, font-space, font-playfair, font-merriweather, font-instrument, font-jetbrains, font-fira |
accent_color | hex | Accent color for highlights |
auto_text_color | bool | Derive text color from the background (default true) |
title_color | hex | Override title color |
subtitle_color | hex | Override subtitle color |
brand_name | string | Brand/logo text (default FastOG) |
brand_logo | string | Brand logo image URL |
layout_mode | string | split | centered | banner (template-specific variants apply) |
template | Template | Category | Additional parameters |
|---|---|---|---|
default | Default | Brand | — |
blog | Blog Post | Content | author, date, domain |
ecommerce | E-commerce | Commerce | price, original_price, rating, rating_total, features, badge, image, domain |
company | Company | Brand | domain, logo, tag |
launch | Product Launch | Brand | kicker, version, tag, cta, domain |
saaslaunch | SaaS Launch | Brand | kicker, cta, domain |
devtool | Developer Tool | Developer | version, badge, domain |
game | Game | Content | price, rating, image, domain |
event | Event | Social | location, host, date, domain |
quote | Quote | Social | quote, author_name, author_title |
job | Job Posting | Social | location, department, salary, job_type, domain |
stats | Stats | Data | metric, metric_label, delta |
pricing | Pricing | Commerce | price, period, cta |
podcast | Podcast | Media | episode_number, guest_name, guest_role, duration |
video | Video | Media | duration, channel, views |
editorial | Editorial | Content | kicker, author, date, domain |
minimal | Minimal | Brand | domain |
changelog | Changelog | Developer | version, tag |
corporate | Corporate | Brand | kicker, tag, domain |
hero | Hero | Brand | kicker, cta, status, domain |
imageright | Image Right | Commerce | kicker, image, domain |
logos | Logo Wall | Brand | kicker, brand_logos, domain |
notice | Notice | Social | notice_status, notice_icon, notice_text, date, domain |
testimonial | Testimonial | Social | quote, author_name, author_title, company, author_avatar, rating, rating_total, quote_style |
logofocus | Logo Focus | Content | kicker, domain |
xheader | X Header | Social | size, handle, followers, location, website, avatar |
bento | Bento | Data | kicker, tiles, domain |
comparison | Comparison | Commerce | kicker, left_label, left_desc, left_points, right_label, right_desc, right_points, verdict |
timeline | Timeline | Content | kicker, milestones, domain |
countdown | Countdown | Brand | kicker, target_date, cta, domain |
news | News | Content | headline, byline, author, date, source, image |
code | Code | Developer | code, language, terminal_title, author, domain |
testimonialpro | Testimonial Pro | Social | quote, author_name, author_title, company, author_avatar, rating, rating_total, cta |
product | Product | Commerce | badge, title, price, original_price, rating, rating_total, features, image, layout_mode |
promo | Promo | Brand | brand_name, benefits, title, subtitle, domain, layout_mode |
devblog | Dev Blog | Content | category, title, subtitle, tags, author, author_title, date, read_time, views, likes, comments, code, language, file_path |
codepost | Code Post | Content | category, date, title, subtitle, author, read_time, code, file_path, language |
statsbar | Stats Bar | Data | kicker, metric, metric_label, delta, stats, domain |
changelogpro | Changelog Pro | Developer | version, tag, title, changes, features, domain |
quotecta | Quote CTA | Social | quote, author_name, author_title, company, cta, domain |
appscreenshot | App Screenshot | Media | badge, title, subtitle, app_name, rating, screenshot, domain |
| Type | Format | Example |
|---|---|---|
list | Comma-separated values | features=Fast,Cheap,Secure |
tiles | Line-separated label|value pairs | tiles=Requests|12.4M\nUptime|99.99% |
milestones | Line-separated date|title|description | milestones=Q3 2026|Alpha|Invite-only |
changes | Line-separated type|text (added,fixed,improved,removed) | changes=added|Bento templates |
Response
- 200 OK — Returns PNG image data
- 401 Unauthorized — Invalid or missing authentication
- 422 Unprocessable — Invalid template parameters
Error Responses
| Error Code | HTTP Status | Description |
|---|---|---|
missing_signature | 401 | Missing s, t, or key parameter |
invalid_signature_format | 401 | Signature not 64 hex characters |
expired_timestamp | 401 | Timestamp older than 5 minutes |
invalid_signature | 401 | Signature verification failed |
missing_api_key | 401 | Missing API key |
Example Request
GET /api/v1/og?template=blog&title=Hello%20World&subtitle=A%20test%20post&key=sk_quick_123abc&s=a1b2c3...&t=1722718800Example cURL
curl "https://fastog.com/api/v1/og?template=blog&title=Hello%20World&key=sk_quick_123abc&s=<signature>&t=<timestamp>"Pricing & Limits
FastOG is credit-based: each image render costs 1 credit. There is no separate
requests-per-minute cap on the API — your credit balance is the limit.
| Pack | Price | Credits | Per image |
|---|---|---|---|
| Starter | $2.00 | 1,200 | ~$0.0017 |
| Pro (Popular) | $9.00 | 6,300 | ~$0.0014 |
| Business | $40.00 | 32,000 | ~$0.0013 |
Per-image cost is price ÷ credits.
params, regardless of the t/s signature) never reach the origin, so they cost 0 credits —
only the first render of a given image is charged.
Watermark: until your first completed payment, every rendered image carries a small FastOGbadge (the 100 free signup credits are a trial). After your first credit top-up the watermark is
removed from all future renders. The API sets an X-FastOG-Watermark response header
(1 = watermarked, 0 = clean) so you can detect it programmatically.
Related
- Documentation — All FastOG guides and references
- Free OG Image Tester— Preview without an account
- Quick Start Guide — includes the architecture flow (sign at render time)
- HMAC Signature Guide
- HMAC Validation
- JavaScript Tutorial
Try it free — no signup required
Preview and test dynamic OG images in seconds.
Open the Free OG Image Tester