New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

snapforge

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snapforge

Official SDK for SnapForge - Dynamic OG Image & Screenshot API

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

snapforge

Official TypeScript SDK for SnapForge — Dynamic OG Image & Screenshot API.

Install

npm install snapforge

Quick Start

import SnapForge from 'snapforge';

const sf = new SnapForge({ apiKey: 'sf_live_your_key' });

// Get a URL for use in meta tags
const url = sf.getOgUrl({
  template: 'blog-post',
  params: { title: 'Hello World', author: 'Jane Doe' },
});
// → https://api.snapforgehq.com/v1/og?template=blog-post&title=Hello+World&...

// Generate and download an image
const image = await sf.generateOg({
  template: 'blog-post',
  params: { title: 'Hello World', author: 'Jane Doe' },
});
// → ArrayBuffer (PNG)

Templates

TemplateParameters
blog-posttitle, subtitle, author, bg_from, bg_to
socialtitle, description, brand, bg_color, accent
minimaltitle, color, text_color
product-hunttagline, description, category, upvotes
github-cardname, description, stars, language, language_color

API

new SnapForge(config)

const sf = new SnapForge({
  apiKey: 'sf_live_your_key',       // Required
  baseUrl: 'https://api.snapforgehq.com', // Optional
});

sf.generateOg(options)Promise<ArrayBuffer>

Generate an OG image and return the PNG as an ArrayBuffer.

sf.getOgUrl(options)string

Get a URL that generates the image on request. Use this in <meta> tags.

sf.screenshot(options)Promise<ArrayBuffer>

Capture a screenshot. Requires Starter plan or higher.

const screenshot = await sf.screenshot({
  url: 'https://example.com',
  width: 1280,
  height: 720,
});

sf.getUsage()Promise<UsageStats>

Get current usage stats.

sf.getTemplates()Promise<TemplateInfo[]>

List available templates.

Keywords

og-image

FAQs

Package last updated on 25 Mar 2026

Related posts