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

fluid-fadp-proxy

v1.0.0

Published

FADP proxy server — wrap OpenRouter, Vast.ai, RunPod, Spheron with crypto payments. AI agents pay in USDC automatically.

Downloads

145

Readme

fluid-fadp-proxy

FADP proxy server for AI compute services.

Let AI agents pay for OpenRouter, RunPod, Vast.ai, and Spheron in USDC — automatically, with no API keys or credit cards needed by the agent.

npm version License: MIT


How It Works

AI Agent
   |
   | agent.fetch('http://your-proxy/openrouter/chat/completions')
   |
   ▼
FADP Proxy (this server)
   |-- returns 402 + X-FADP-Required: { amount: "0.001 USDC" }
   |-- agent pays automatically via Fluid Wallet
   |-- proxy verifies payment on Base blockchain
   |-- forwards request to real OpenRouter API
   |-- returns response to agent
   |
   ▼
OpenRouter / RunPod / Vast.ai / Spheron
(proxy uses your API keys — agent never sees them)

Quick Start

# Install
npm install -g fluid-fadp-proxy

# Copy and fill in your config
cp .env.example .env

# Start the proxy
npx fluid-fadp-proxy

Configuration (.env)

# Your Fluid Wallet address — receives all USDC payments
FLUID_WALLET_ADDRESS=0xYourAddress

# Service API keys (add only what you have)
OPENROUTER_API_KEY=sk-or-...
RUNPOD_API_KEY=...
VASTAI_API_KEY=...
SPHERON_API_KEY=...

# Pricing in USDC per request (defaults shown)
PRICE_OPENROUTER=0.001
PRICE_RUNPOD=0.05
PRICE_VASTAI=0.10
PRICE_SPHERON=0.02

Agent Usage

Agents pay automatically using fluid-wallet-agentkit:

import { FluidAgent } from 'fluid-wallet-agentkit';

const agent = new FluidAgent({
  apiKey: process.env.FLUID_AGENT_KEY,  // fwag_...
  fadp: true,                            // auto-pay enabled
  fadpMaxUsd: 5,                         // safety limit
});

// Call OpenRouter — agent pays 0.001 USDC automatically
const res = await agent.fetch('http://localhost:4000/openrouter/chat/completions', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    model: 'openai/gpt-4o',
    messages: [{ role: 'user', content: 'Hello' }],
  }),
});
const data = await res.json();

// Call RunPod — agent pays 0.05 USDC per job
const job = await agent.fetch('http://localhost:4000/runpod/YOUR_ENDPOINT/run', {
  method: 'POST',
  body: JSON.stringify({ input: { prompt: 'Generate an image of...' } }),
});

// Check GPU offers on Vast.ai (free — no payment)
const gpus = await agent.fetch('http://localhost:4000/vastai/bundles?num_gpus=1');

// Create Spheron deployment — agent pays 0.02 USDC
const deploy = await agent.fetch('http://localhost:4000/spheron/compute/instance', {
  method: 'POST',
  body: JSON.stringify({ name: 'my-app', image: 'nginx:latest' }),
});

Endpoints

OpenRouter (/openrouter)

| Method | Path | FADP Payment | Description | |---|---|---|---| | POST | /openrouter/chat/completions | 0.001 USDC | LLM chat (all models, streaming supported) | | GET | /openrouter/models | Free | List available models |

RunPod (/runpod)

| Method | Path | FADP Payment | Description | |---|---|---|---| | POST | /runpod/:endpointId/run | 0.05 USDC | Submit async job | | POST | /runpod/:endpointId/runsync | 0.05 USDC | Submit sync job | | GET | /runpod/:endpointId/status/:jobId | Free | Check job status | | POST | /runpod/graphql | Free | GraphQL (list GPUs etc.) |

Vast.ai (/vastai)

| Method | Path | FADP Payment | Description | |---|---|---|---| | GET | /vastai/bundles | Free | Search GPU offers | | PUT | /vastai/asks/:id | 0.10 USDC | Create/bid on instance | | GET | /vastai/instances | Free | List your instances | | DELETE | /vastai/instances/:id | Free | Destroy instance |

Spheron (/spheron)

| Method | Path | FADP Payment | Description | |---|---|---|---| | GET | /spheron/compute/machine-images | Free | List available machines | | POST | /spheron/compute/instance | 0.02 USDC | Create deployment | | GET | /spheron/compute/instance/:id | Free | Deployment status | | DELETE | /spheron/compute/instance/:id | Free | Close deployment |


What Happens When an Agent Calls a Paid Endpoint

1. Agent sends request (no payment)
2. Proxy returns 402 + X-FADP-Required header
3. Agent's FluidAgent.fetch() detects 402
4. Agent calls fluidnative.com/v1/agents/send → pays USDC on Base
5. Agent retries with X-FADP-Proof: { txHash, nonce }
6. Proxy calls fluidnative.com/v1/fadp/verify → confirmed on-chain
7. Proxy forwards request to real service API
8. Returns response to agent
Total extra time: ~2-3 seconds for on-chain confirmation

Deploy to Production

# Railway / Render / Fly.io
git clone https://github.com/fluidbase9/fadp-proxy
cd fadp-proxy
# Set env vars in your hosting dashboard
# Deploy

Links


License

MIT © Fluid Wallet