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

@delimiter/sdk

v0.1.3

Published

Lightweight rate limit monitoring for AI APIs. Initialize once, monitor everything.

Downloads

35

Readme

@delimiter/sdk

Lightweight rate limit monitoring for AI APIs. Initialize once, monitor everything — delimiter.app.

Zero interference. Zero latency. Zero maintenance. Never touches your API keys.

Install

npm install @delimiter/sdk
# or
pnpm add @delimiter/sdk
# or
yarn add @delimiter/sdk

No peer dependencies. Works with any AI provider SDK, any framework, or raw fetch() calls.

Quick Start

import { delimiter } from '@delimiter/sdk'

// Initialize once at app startup
delimiter.init('dlm_your_project_key')

// Use your AI clients as normal — Delimiter monitors automatically
const openai = new OpenAI({ apiKey: process.env.OPENAI_KEY })

const response = await openai.chat.completions.create({
  model: 'gpt-4o',
  messages: [{ role: 'user', content: 'Hello' }]
})

// That's it. Your delimiter.app dashboard is now live.

Multiple Providers

No extra setup needed. Use as many providers as you want — Delimiter detects them all.

import { delimiter } from '@delimiter/sdk'
import OpenAI from 'openai'
import Anthropic from '@anthropic-ai/sdk'

delimiter.init('dlm_your_project_key')

const openai = new OpenAI({ apiKey: process.env.OPENAI_KEY })
const anthropic = new Anthropic({ apiKey: process.env.ANTHROPIC_KEY })

// Both are automatically monitored — no wrapping needed
const chat = await openai.chat.completions.create({ model: 'gpt-4o', messages: [{ role: 'user', content: 'Hi' }] })
const message = await anthropic.messages.create({ model: 'claude-sonnet-4-20250514', max_tokens: 1024, messages: [{ role: 'user', content: 'Hi' }] })

Add Anthropic 6 months from now? Just start using it. Delimiter detects it automatically — no code changes.

Multi-App Tagging

If you run multiple apps against the same AI provider accounts, tag them:

delimiter.init('dlm_your_project_key', { app: 'my-production-app' })

Your dashboard will show which app is consuming what percentage of your rate limits. Useful for identifying which service to throttle when you're approaching limits.

Configuration

delimiter.init(projectKey, options?)

Initialize the SDK. Call once at app startup.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | projectKey | string | Yes | Your project API key from delimiter.app. Starts with dlm_. | | options.app | string | No | App name tag. Defaults to "default". | | options.endpoint | string | No | Custom reporting endpoint. Defaults to https://delimiter.app/api/report. | | options.enabled | boolean | No | Enable/disable reporting. Defaults to true. Set to false in test environments. | | options.debug | boolean | No | Log reports to console. Defaults to false. |

What Gets Reported

After every AI API call, the SDK extracts rate limit headers and sends a report:

{
  "app": "my-production-app",
  "provider": "openai",
  "model": "gpt-4o",
  "timestamp": "2025-01-15T14:23:01.456Z",
  "limits": {
    "requests_limit": 10000,
    "requests_remaining": 7342,
    "tokens_limit": 2000000,
    "tokens_remaining": 1456000,
    "reset_requests_ms": 43000,
    "reset_tokens_ms": 12000
  }
}

This is sent as an async fire-and-forget POST. It never blocks your API call. If the report fails to send, it's silently dropped.

Supported Providers

The SDK auto-detects providers by domain. Works with official SDKs, LangChain, Vercel AI SDK, LiteLLM, or raw fetch() calls.

| Provider | Domain | |----------|--------| | OpenAI | api.openai.com | | Anthropic | api.anthropic.com | | Google Gemini | generativelanguage.googleapis.com | | Mistral | api.mistral.ai | | Cohere | api.cohere.com | | Groq | api.groq.com | | DeepSeek | api.deepseek.com | | xAI | api.x.ai | | Perplexity | api.perplexity.ai | | Together AI | api.together.xyz | | Fireworks AI | api.fireworks.ai | | Replicate | api.replicate.com | | Azure OpenAI | *.openai.azure.com | | Amazon Bedrock | bedrock-runtime.*.amazonaws.com | | OpenRouter | openrouter.ai |

...and any provider that speaks HTTP. The list grows with every SDK update — your code doesn't change.

Security

The SDK never touches your API keys.

API keys are sent in request headers. Delimiter only reads response headers — rate limit numbers, not credentials. Your keys never leave your environment.

The SDK never modifies your requests or responses.

The HTTP instrumentation is read-only on responses. Your API calls are identical with or without Delimiter.

The SDK never adds latency to your API calls.

Header extraction happens synchronously (nanoseconds). Reporting is a background POST that fires after your response is already returned.

The SDK never fails loudly.

All reporting is wrapped in try/catch with silent failure. If Delimiter's backend is unreachable, the SDK does nothing. Your app continues working normally.

How It Works Internally

  1. delimiter.init() patches globalThis.fetch and Node's http.request/https.request
  2. On every outbound request, the SDK checks the URL against known AI provider domains
  3. Non-matching requests pass through with zero overhead
  4. For matching requests, the SDK reads rate-limit headers from the response
  5. A fire-and-forget POST sends the parsed headers to the Delimiter API
  6. The original response is returned to your code, unchanged

This is the same auto-instrumentation technique used by Datadog, Sentry, and New Relic. It works with any HTTP client or framework because it sits at the network layer.

Environments

// Production — reporting enabled (default)
delimiter.init('dlm_key')

// Testing — disable reporting
delimiter.init('dlm_key', { enabled: false })

// Development — enable debug logging
delimiter.init('dlm_key', { debug: true })

TypeScript

The SDK is written in TypeScript and ships type definitions. Since Delimiter works at the network layer, your AI client types are completely unaffected — no wrapping, no type changes, no generics to worry about.

Requirements

  • Node.js 18+

License

MIT