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

pnkd-aiproxy

v2.0.1

Published

Local proxy for LLM APIs. One endpoint for all providers. Logging, cost tracking, load balancing. PRO: 6 providers, auto-fallback, API translation, dashboard.

Readme

aiproxy

Local proxy for LLM APIs. One endpoint for all providers.

npm version

Installation

npm install -g pnkd-aiproxy

Quick Start

# Configure API keys
aiproxy config set openai-key sk-xxx
aiproxy config set anthropic-key sk-ant-xxx

# Start proxy
aiproxy start --port 8080

# Point your app to the proxy
# OpenAI: http://localhost:8080/v1
# Anthropic: http://localhost:8080/anthropic

Commands

FREE Commands

| Command | Description | |---------|-------------| | start | Start proxy server | | stop | Stop proxy server | | config <get\|set> [key] | Manage configuration | | providers | List available providers | | logs | View request logs | | stats | Show statistics | | cost | Show cost breakdown | | limit <set\|clear> [rate] | Set rate limit | | export | Export logs | | license | Manage license |

PRO Commands

| Command | Description | |---------|-------------| | keys <add\|remove\|list> | Manage multiple API keys | | rules | Custom routing rules | | dashboard | Web monitoring dashboard |

Provider Endpoints

OpenAI:    http://localhost:8080/v1
Anthropic: http://localhost:8080/anthropic
Google:    http://localhost:8080/google     [PRO]
Groq:      http://localhost:8080/groq       [PRO]
Ollama:    http://localhost:8080/ollama     [PRO]
Custom:    http://localhost:8080/custom     [PRO]

Options

Start Options

  • --port <port> - Proxy port (default: 8080)

Stats/Logs Options

  • --last <n> - Show last N entries
  • --today - Filter by today
  • --month - Filter by this month
  • --by-model - Group by model
  • --by-day - Group by day
  • --json - Output as JSON

FREE vs PRO

| Feature | FREE | PRO | |---------|------|-----| | Requests per day | 100 | Unlimited | | Providers | 2 (OpenAI, Anthropic) | 6 (all) | | Keys per provider | 1 | Unlimited | | Load balancing | - | Yes | | Auto-fallback | - | Yes | | API translation | - | Yes | | Web dashboard | - | Yes | | Custom routing | - | Yes |

PRO Features

Load Balancing

Distribute requests across multiple API keys:

aiproxy keys add openai sk-key1
aiproxy keys add openai sk-key2
aiproxy keys add openai sk-key3

Supports strategies: round-robin, random, least-latency, weighted.

Auto-Fallback

Automatically retry with another provider if one fails:

OpenAI error → Try Anthropic → Try Groq

API Translation

Use OpenAI format with any provider:

# Send OpenAI format to Anthropic
curl http://localhost:8080/anthropic/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-4.5-opus", "messages": [{"role": "user", "content": "Hi"}]}'

Web Dashboard

Monitor requests, costs, and errors in real-time:

aiproxy dashboard
# Opens http://localhost:8081

PRO License

$18.99 one-time payment

Purchase at: https://pnkd.dev/aiproxy

# Activate license
aiproxy license activate APX-XXXX-XXXX-XXXX-XXXX

# Check status
aiproxy license status

Example Usage

Python with OpenAI SDK

import openai

client = openai.OpenAI(
    api_key="your-key",
    base_url="http://localhost:8080/v1"
)

response = client.chat.completions.create(
    model="gpt-5-turbo",
    messages=[{"role": "user", "content": "Hello"}]
)

JavaScript/TypeScript

import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'your-key',
  baseURL: 'http://localhost:8080/v1',
});

const response = await client.chat.completions.create({
  model: 'gpt-5-turbo',
  messages: [{ role: 'user', content: 'Hello' }],
});

cURL

curl http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxx" \
  -d '{
    "model": "gpt-5-turbo",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Cost Tracking

Supported models and pricing (per 1M tokens):

| Model | Input | Output | |-------|-------|--------| | gpt-5 | $20 | $60 | | gpt-5-turbo | $5 | $15 | | gpt-4.5-turbo | $1 | $3 | | o3 | $10 | $40 | | claude-5 | $20 | $80 | | claude-4.5-opus | $15 | $75 | | claude-4.5-sonnet | $3 | $15 | | claude-4.5-haiku | $0.25 | $1.25 | | gemini-2.0-pro | $2.50 | $10 | | llama-4 | $0.50 | $1.50 |

Data Storage

All data stored locally in ~/.aiproxy/:

  • config.json - Configuration
  • stats.json - Statistics
  • logs/ - Request logs (JSONL format)
  • license.json - License info

More PRO Tools

Support

  • Issues: https://github.com/pnkd-dev/aiproxy/issues
  • Website: https://pnkd.dev/aiproxy

License

MIT - pnkd.dev