npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

promptforge-server-sdk

v1.0.8

Published

The official SDK for Prompt Forge Studio API.

Downloads

66

Readme

promptforge-server-sdk

npm version Socket Badge License: MIT

Official Node.js / Edge SDK for PromptForge Studio. PromptForge is a "Prompt-as-a-Service" platform that lets you manage, optimize, and execute prompts via a managed API.

📖 Full Documentation

Visit our Documentation Hub for the complete experience:


🚀 Quick Start

1. Installation

npm install promptforge-server-sdk

2. Get your API Key

Go to the Settings sidebar in PromptForge Studio and generate a new API Key.

3. Usage

Initialize the PromptForgeClient. If you are using a self-hosted instance (like Vercel), you must provide the baseURL.

import { PromptForgeClient } from 'promptforge-server-sdk';

const client = new PromptForgeClient({
  apiKey: process.env.PROMPTFORGE_API_KEY,
  baseURL: "https://your-vercel-domain.vercel.app" // 👈 Required for custom deployments
});

Example: Gemini Execution (Default)

Most models route to Gemini Flash or Pro based on length and complexity.

const response = await client.execute({
  versionId: 'gemini-prompt-uuid',
  variables: { topic: 'Space' }
});

Example: NVIDIA Execution

To use NVIDIA models, ensure your prompt is configured (or the model is specified) with the nvidia/ prefix.

const response = await client.execute({
  versionId: 'nvidia-prompt-uuid',
  variables: { 
    project_name: 'PromptForge',
    ceo_name: 'Jensen'
  }
});

if (response.success) { console.log("Result:", response.data); }


⚖️ SDK vs API: When to Use?

| Feature | Node.js SDK | REST API | | :--- | :--- | :--- | | Language | JavaScript/TypeScript | Any (Python, Go, etc.) | | TypeScript | Native Support | Manual Types | | Caching | Built-in | Manual | | Ease of Use | High (Method calls) | Moderate (HTTP requests) | | Best For | Next.js, Node, Vercel | Python, PHP, Microservices |


🛠️ Best Practices (Do's & Don'ts)

✅ The Do's

  • Use Environment Variables: Always store your API keys in .env files (e.g. PROMPTFORGE_API_KEY).
  • Check Success Flag: Always verify result.success before attempting to access result.data.
  • Use TypeScript: Take advantage of our internal types for better IDE autocompletion.
  • Implement Singletons: In serverless environments, initialize the PromptForgeClient once and reuse it to optimize memory.

❌ The Don'ts

  • Never Call from Client-Side: Do not call the SDK or API from the browser. Your API keys will be exposed to users in the Network tab.
  • Don't Hardcode Prompts: Keep your prompt logic in PromptForge Studio and reference them by Version ID. This allows you to update prompts without redeploying code.
  • Don't Ignore Metadata: Fields like meta.latency_ms and meta.tokens_input are vital for monitoring performance and costs.

🛡️ Support