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

ssimplifi-prism

v1.8.0

Published

Node SDK for Prism by Ssimplifi — the AI gateway that picks the model for you.

Readme

ssimplifi-prism — Node SDK for Prism

npm install ssimplifi-prism

Quick start

import { Prism } from "ssimplifi-prism";

const client = new Prism({ apiKey: process.env.PRISM_API_KEY! });

const response = await client.chat.completions.create({
  messages: [{ role: "user", content: "What's the capital of Australia?" }],
  mode: "balanced",
});
console.log(response.choices[0].message.content);

That's it. The SDK extends the official OpenAI Node SDK, pointed at Prism's base URL. Everything you already know about openai — streaming, retries, response shape — works identically.

Prism-specific kwargs

| Field | Header | What it does | |---|---|---| | mode: "eco" \| "balanced" \| "sport" | X-Prism-Mode | Quality/cost mode for auto-routing | | model_prefer: "claude-sonnet" | X-Prism-Model-Prefer | Force a specific model | | session_id: "user-abc" | X-Prism-Session | Multi-turn memory | | cache: "off" \| "exact" \| "semantic" | X-Prism-Cache | Cache behavior for this request | | request_tags: { feature: "search" } | X-Prism-Request-Tags | Attribution tags for usage breakdown |

// Multi-turn chat with session memory
await client.chat.completions.create({
  messages: [{ role: "user", content: "Remember: my name is Ravi" }],
  session_id: "user-abc",
});

// Next call — no need to resend history
const r = await client.chat.completions.create({
  messages: [{ role: "user", content: "What's my name?" }],
  session_id: "user-abc",
});
console.log(r.choices[0].message.content);  // "Your name is Ravi."

Admin methods (Pro/Team tier)

// Live model catalog
const catalog = await client.models.list({ provider: "groq" });
console.log(catalog.summary);

// Your usage
console.log(await client.usage.summary({ days: 7 }));

// Cache stats
console.log(await client.cache.stats({ days: 7 }));

// API keys
console.log(await client.keys.list());
const newKey = await client.keys.create({ name: "staging-app" });
console.log(newKey.key);  // full secret shown ONCE
await client.keys.revoke("key-id-from-list");

// Identity + balance
console.log(await client.whoami());
console.log(await client.balance());

Drop-in replacement for plain OpenAI

// Before
import OpenAI from "openai";
const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });

// After
import { Prism } from "ssimplifi-prism";
const client = new Prism({ apiKey: process.env.PRISM_API_KEY! });

Every client.chat.completions.create(...) call you already wrote continues to work. Add mode: and you've got auto-routing + caching + multi-provider failover.

Compatibility

  • Node 18+
  • Builds on openai@^4.50.0
  • Tied to the Prism backend /v1/ major version — SDK 1.x works with any backend 1.x.

License

Apache-2.0