Open Source SDK

OG Image API
Pixel-Perfect

Generate beautiful Open Graph images with real Chromium rendering. Full Tailwind CSS support, built-in templates, and pixel-perfect results — unlike Satori's limited SVG rendering.

$ npm install @nodium/og

Why not @vercel/og?

Satori renders SVGs with limited CSS support. Nodium uses a real Chromium browser.

S

@vercel/og

Satori SVG rendering

  • Limited CSS subset — no grid, limited flexbox
  • SVG rendering — not pixel-perfect
  • No Tailwind CSS support
  • Edge-only — tied to Vercel platform
  • Fast cold starts
  • No external API needed
N

@nodium/og

Real Chromium rendering

  • Full CSS support — grid, flexbox, animations
  • Real Chromium — pixel-perfect rendering
  • Full Tailwind CSS via CDN
  • Works everywhere — any framework, any host
  • Built-in type-safe templates
  • 3 rendering modes: template, HTML, auto

Three ways to render

Choose the rendering mode that fits your workflow.

Template

Use built-in type-safe templates with strongly-typed parameters. Pass your data and get a beautiful OG image instantly.

HTML

Write custom HTML with full Tailwind CSS support. Full creative control with real Chromium rendering.

Auto

Pass any URL and get an OG-sized screenshot automatically. Perfect for dynamic content previews.

Simple, powerful API

Three rendering modes, one consistent API.

Template mode
import { NodiumOG } from "@nodium/og";

const og = new NodiumOG({ apiKey: process.env.NODIUM_API_KEY });

const image = await og.template("blog-post", {
  title: "Building a Modern API",
  author: "Jane Doe",
  date: "2026-03-06",
  readingTime: "5 min read",
});

// Returns Buffer — serve directly or save to file
HTML mode — full Tailwind CSS
const image = await og.html(`
  <div class="flex h-full w-full items-center justify-center
              bg-gradient-to-br from-orange-500 to-red-600 p-16">
    <div class="text-center text-white">
      <h1 class="text-6xl font-bold">My Awesome Post</h1>
      <p class="mt-4 text-2xl opacity-80">nodium.io</p>
    </div>
  </div>
`);
Auto mode — screenshot any URL
const image = await og.auto({
  url: "https://example.com/blog/my-post",
  width: 1200,
  height: 630,
});

6 built-in templates

Production-ready templates with type-safe parameters. Use as-is or as a starting point.

blog-post

Blog Post

Article with title, author, date, and reading time. Perfect for blog OG images.

product

Product

SaaS or product launch card with logo, tagline, and screenshot preview.

profile

Profile

Author or speaker profile card with avatar, name, and bio.

event

Event

Conference or meetup card with date, location, and speaker info.

minimal

Minimal

Clean minimalist design with configurable accent color.

gradient

Gradient

Bold gradient background with large centered text. Eye-catching on social feeds.

Works with your framework

First-class integrations for popular frameworks. One-line setup.

Next.js — app/api/og/route.ts
import { NodiumOG } from "@nodium/og";
import { createOGHandler } from "@nodium/og/next";

const og = new NodiumOG({ apiKey: process.env.NODIUM_API_KEY });

export const GET = createOGHandler(og, {
  defaultTemplate: "blog-post",
});
Express
import { NodiumOG } from "@nodium/og";
import { createOGMiddleware } from "@nodium/og/express";

const og = new NodiumOG({ apiKey: process.env.NODIUM_API_KEY });

app.use("/api/og", createOGMiddleware(og));
Hono
import { NodiumOG } from "@nodium/og";
import { createOGRoute } from "@nodium/og/hono";

const og = new NodiumOG({ apiKey: process.env.NODIUM_API_KEY });

app.route("/api/og", createOGRoute(og));

CLI included

Preview templates locally, list available templates, and test your OG images before deploying — all from the command line.

  • List all available templates
  • Preview in your browser
  • Test with custom data
  • Zero configuration needed
Terminal
$ npx nodium-og list

Available templates:
  blog-post    Blog article with title and author
  product      SaaS product launch card
  profile      Author/speaker profile card
  event        Conference or meetup card
  minimal      Clean minimalist design
  gradient     Bold gradient background

$ npx nodium-og preview blog-post
Opening preview in browser...

Generous free tier

1,000 renders per month — free. No credit card required. Scale when you need to with simple, transparent pricing.

Beautiful OG images in minutes

Install the SDK, pick a template, and start generating.

$ npm install @nodium/og

Free tier • 1,000 renders/month • Open source • MIT license