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

classer-ai

v0.0.3

Published

High-performance AI classification — <200ms latency, up to 100x cheaper, beats GPT-5 mini accuracy

Downloads

300

Readme

classer-ai

High-performance AI classification

<200ms latency · up to 100x cheaper · beats GPT-5 mini accuracy · self-calibrating accuracy · no prompt engineering

Installation

npm install classer-ai

Quick Start

import { classify, tag } from "classer-ai";

// Single-label classification
const result = await classify({
  text: "I can't log in and need a password reset.",
  labels: ["billing", "technical_support", "sales", "spam"]
});
console.log(result.label);      // "technical_support"
console.log(result.confidence); // 0.94

// With descriptions for better accuracy
const lead = await classify({
  text: "We need a solution for 500 users, what's your enterprise pricing?",
  labels: ["hot", "warm", "cold"],
  descriptions: {
    hot: "Ready to buy, asking for pricing or demo",
    warm: "Interested but exploring options",
    cold: "Just browsing, no clear intent"
  }
});
console.log(lead.label); // "hot"

// Multi-label tagging
const tagged = await tag({
  text: "Breaking: Tech stocks surge amid AI boom",
  labels: ["politics", "technology", "finance", "sports"],
  threshold: 0.3
});
for (const t of tagged.labels) {
  console.log(`${t.label}: ${t.confidence}`);
}
// technology: 0.92
// finance: 0.78

Configuration

No API key is needed to get started. To unlock higher rate limits, get an API key from classer.ai/api-keys.

export CLASSER_API_KEY=your-api-key

Or configure programmatically:

import { ClasserClient } from "classer-ai";

const client = new ClasserClient({
  apiKey: "your-api-key"
});

API Reference

classify(request)

Classify text into exactly one of the provided labels.

const result = await classify({
  text: string,             // Text to classify
  labels?: string[],        // 1-200 possible labels
  classifier?: string,      // Saved classifier name or "name@vN"
  descriptions?: Record<string, string>,
  speed?: "fast" | "standard",  // "standard" (default, <1s) or "fast" (<200ms)
  cache?: boolean           // Set to false to bypass cache. Default: true
});

// Returns ClassifyResponse
result.label        // Selected label
result.confidence   // 0-1 confidence score
result.tokens       // Total tokens used
result.latency_ms   // Processing time in ms
result.cached       // Whether served from cache

tag(request)

Multi-label tagging — returns all labels above a confidence threshold.

const result = await tag({
  text: string,
  labels?: string[],        // 1-200 possible labels
  classifier?: string,      // Saved classifier name or "name@vN"
  descriptions?: Record<string, string>,
  threshold?: number,       // Default: 0.3
  speed?: "fast" | "standard",  // "standard" (default, <1s) or "fast" (<200ms)
  cache?: boolean           // Set to false to bypass cache. Default: true
});

// Returns TagResponse
result.labels       // Array of { label, confidence }
result.tokens       // Total tokens used
result.latency_ms   // Processing time in ms
result.cached       // Whether served from cache

Error Handling

import { ClasserError } from "classer-ai";

try {
  const result = await classify({ text: "hello", labels: ["a", "b"] });
} catch (e) {
  if (e instanceof ClasserError) {
    console.error(e.status);  // HTTP status code
    console.error(e.detail);  // Error detail from API
  }
}

Documentation

Full API reference and guides at docs.classer.ai.

GitHub

github.com/classer-ai/classer-js

License

MIT