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

aiprox-openai

v1.0.0

Published

Drop-in OpenAI SDK replacement powered by AIProx — one package, three payment rails, nineteen models, ten agents

Readme

aiprox-openai

Drop-in replacement for the OpenAI SDK. One package. Three rails. Nineteen models. Ten agents.

Pay with Bitcoin Lightning, Solana USDC, or Base — your apiKey format determines the rail automatically.

Install

npm install aiprox-openai

Usage

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

// After — Lightning:
import OpenAI from 'aiprox-openai'
const client = new OpenAI({ apiKey: process.env.LIGHTNINGPROX_SPEND_TOKEN }) // lnpx_...

// After — Solana:
import OpenAI from 'aiprox-openai'
const client = new OpenAI({ apiKey: process.env.SOLANA_WALLET_ADDRESS }) // base58

// After — Base:
import OpenAI from 'aiprox-openai'
const client = new OpenAI({ apiKey: process.env.BASE_WALLET_ADDRESS }) // 0x...

// Everything else stays identical:
const response = await client.chat.completions.create({
  model: 'claude-opus-4-5-20251101',
  messages: [{ role: 'user', content: 'Summarize the latest AI news' }]
})
console.log(response.choices[0].message.content)

The rail is detected automatically from the apiKey format. No config needed.

What's different

AIProx routes your task through its multi-agent orchestrator. The last user message becomes the task. The orchestrator selects the best available agent and returns the result in standard OpenAI format.

Bonus: response._aiprox contains the receipt — which agents ran, what was spent, how long it took.

console.log(response._aiprox)
// {
//   agents_used: ['lightningprox'],
//   total_sats_spent: 30,
//   duration_ms: 524,
//   receipt_id: 'orch_1773...'
// }

Auth — three rails, one constructor

| apiKey format | Rail | Payment | |---------------|------|---------| | lnpx_... | Bitcoin Lightning | Sats per request | | 0x... (40+ chars) | Base/EVM | USDC on Base | | base58 (32-44 chars) | Solana | SOL or USDC |

Get a Lightning spend token: lightningprox.com Fund a Solana wallet: solanaprox.com Register: aiprox.dev

Supported models (19 across 5 providers)

| Model | Provider | |-------|----------| | claude-opus-4-5-20251101 | Anthropic | | gpt-4-turbo | OpenAI | | meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8 | Together.ai | | meta-llama/Llama-3.3-70B-Instruct-Turbo | Together.ai | | mistral-large-latest | Mistral | | magistral-medium-latest | Mistral (Reasoning) | | gemini-2.5-flash | Google | | gemini-2.5-pro | Google | | (+ 11 more) | |

Full list: aiprox.dev/api/agents

Error handling

try {
  const r = await client.chat.completions.create({ ... })
} catch (err) {
  if (err.code === 'insufficient_balance') {
    // err.status === 402 — top up at aiprox.dev
  }
  if (err.code === 'no_agent_available') {
    // err.status === 404 — no agent for this capability
  }
}

Docs

aiprox.dev · Built by LPX Digital Group LLC