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

assisters

v0.2.0

Published

Official TypeScript SDK for the Assisters API (api.assisters.dev)

Readme

assisters

Official TypeScript SDK for the Assisters API.

One API key, one client, every model. Typed end to end, no runtime dependencies — just fetch.

Install

npm install assisters

Node 18+ (the SDK uses the built-in fetch).

Quick start

import { AssistersClient } from "assisters";

const client = new AssistersClient(process.env.ASSISTERS_API_KEY!);

const completion = await client.chat.create({
  model: "assisters-chat-v1",
  messages: [{ role: "user", content: "Explain prompt caching in one sentence." }],
});

console.log(completion.choices[0].message.content);

Get a key from the dashboard.

Resources

The client exposes one namespace per API area:

| Namespace | Method | Does | |---|---|---| | client.chat | create(params) | Chat completions | | client.embeddings | create(params) | Vectors for search, clustering, RAG | | client.moderations | create(params) | Content-safety classification | | client.rerank | create(params) | Order documents by relevance | | client.translate | create(params) | Translate text | | client.models | list(), retrieve(id) | The catalogue, with pricing | | client.images | generate(params) | Text to image | | client.audio | speech(), transcribe(), enhance() | TTS, STT, cleanup | | client.webSearch | query(params) | Live web search with citations | | client.usage | tokens(), cost(), rateLimit() | What you have spent |

const { data } = await client.embeddings.create({
  model: "assisters-embed-v1",
  input: "The quick brown fox",
});

const results = await client.webSearch.query({ query: "WCAG 2.2 contrast rules" });

const audio = await client.audio.speech({ input: "Hello there", voice: "nova" });
await writeFile("out.mp3", Buffer.from(audio));

Not here, on purpose

credits, collections, notifications and apiKeys used to be namespaces on this client. Every one of those endpoints authenticates with a signed-in browser session rather than a Bearer key, so they returned 401 for any client built the way this one is. Wallet, collections, notifications and key management live in the dashboard. A marketplace search namespace was also removed — it is served by assisters.io, not by api.assisters.dev.

Errors

Every failure throws a typed error, so you can branch on the cause rather than parse a message:

import { AssistersClient, RateLimitError, AuthError } from "assisters";

try {
  await client.chat.create({ model: "assisters-chat-v1", messages });
} catch (err) {
  if (err instanceof RateLimitError) {
    // err.retryAfterMs tells you how long to wait
  } else if (err instanceof AuthError) {
    // key is missing, invalid or revoked
  }
}

AssistersError is the base class and carries the HTTP status; RateLimitError, AuthError and NotFoundError extend it.

Configuration

const client = new AssistersClient(apiKey, {
  baseUrl: "https://api.assisters.dev", // override for a private deployment
});

Billing

Usage is billed per token against a shared prepaid wallet — no subscription. Rates are per model and published at assisters.dev/pricing; GET /v1/models returns the same figures the meter charges. Prompt-cache reads are billed at 10% of the input rate and cache writes at 1.25x.

Links

License

MIT