Skip to content

About

Buyer-controlled client for x402 API payments in USDC on Base.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

5.9k stars

Watchers

57 watching

Forks

Latest commit

 

History

112 Commits

Folders and files

vAPI Network

npm version CI License: Apache-2.0 Node.js 22 or newer

One wallet, every x402 API. vapi-network is the open-source, non-custodial TypeScript client for discovering and paying x402 services in USDC, from a terminal, an MCP client or your own code. It pays on Base by default and on Arc when you enable it; Networks lists what works where.

The client gives one local wallet to you and to your agents. You search every x402 catalogue at once, pay an API per call under spend caps you set, and keep a receipt for each payment. The same wallet gives each agent its own capped account, buys model access on vAPI Router and moves USDC between your accounts.

vAPI Network builds payment and trust infrastructure for AI agents. Call, Router, Stake and Agents are live on production. Tasks V2 is live on Base mainnet. See vapinetwork.ai and the documentation.

vAPI Network is not related to Vapi.ai, the voice AI company.

Quickstart

This README describes client 0.16.1. npm view vapi-network version shows the latest published release. The client needs Node.js 22 or newer.

npm i -g vapi-network
vapi setup [--no-cloud-backup]   # creates or restores the vault, derives main, links it to your owner wallet; safe to rerun
vapi fund                        # opens the hosted funding page for your address
vapi search "weather"            # every catalogue, merged, with provenance
vapi pay <listing-ref> --max 0.02
vapi receipts                    # one line per paid call: quote, settlement, latency

No install? Prefix any command with npx vapi-network, for example npx vapi-network setup. (npx vapi cannot work: the bare vapi name on npm belongs to an unrelated package.)

Back up the recovery phrase only in a terminal; vAPI cannot recover it. Turn on encrypted cloud backup with vapi backup --cloud; only the owner can approve a restore. On a server, a container or GitHub Codespaces, read Linux without a keyring before vapi setup.

An agent can set itself up from the agent skill. Tell it: "Read https://vapinetwork.ai/SKILL.md and follow it to set up vAPI." The same file ships in this package as SKILL.md, with the CLI version it describes in its frontmatter.

Interactive CLI runs check for a newer release at most once a day and cache the result in ~/.vapi/update-check.json. JSON, MCP server, CI and non-TTY runs skip the check. Set VAPI_NO_UPDATE_CHECK=1 to disable it.

How a payment works

The device vault encrypts your keys on this machine, using an OS-stored device key with optional password protection. vAPI applies your spend caps before signing, sends the payment straight to the service, and writes a local receipt. There is no payment proxy and no server-side signer. vAPI Call takes no fee; providers are paid directly.

Local runs keep keys on this machine; experimental Railway runs require explicit member-key export. Call and discovery metrics are measured locally and nothing is uploaded unless you send a report yourself. Every payment identifies this client as vapi through x402 builder-code; when an API advertises payment-identifier, the generated id is kept on that receipt.

What is in this repository

Everything that runs on your machine is in this repository under the Apache-2.0 license. That covers the wallet and its spend caps, x402 signing, the receipt ledger, catalogue search, the CLI, the MCP server, the SDK and the desktop app. You can read how a payment is built and signed before you make one.

The client also talks to hosted vAPI services. Their source is not in this repository.

Hosted service The client uses it to
vAPI Call search the vAPI registry, and publish or claim a listing
Owner link connect this device's accounts to your owner wallet during vapi setup and vapi login
vAPI Router buy and use model access, and read your balance and stake status
Transfer relay submit a transfer you signed between your own accounts, and pay its gas
Cloud backup keep an encrypted vault copy that only the owner can restore
Funding page take a card, wallet or bridge deposit and deliver USDC on Base
Tasks audited task posting and USDC escrow on Base mainnet

A payment to an x402 API does not pass through these services. The client signs it and sends it to the API's own endpoint. Search also reads Coinbase Bazaar, x402scan and a local file, and VAPI_REGISTRY_URL points the client at another registry.

Networks

Payments are in USDC. Base is on by default; you enable the other networks per machine.

Network Pay x402 APIs Send between accounts Sweep How to enable
Base mainnet yes yes USDC and ETH on by default
Arc mainnet yes yes USDC vapi init --networks base,arc or vapi accounts --enable arc
Arc testnet yes no USDC set ARC_TESTNET_RPC_URL
Base Sepolia and other EVM networks when configured no USDC when configured add the RPC URL and USDC address to config.json
Solana mainnet not yet no no listings are searchable; paying one returns unsupported_network

The hosted funding page delivers USDC on Base. On Arc, USDC is also the gas token. Identifiers, token addresses and RPC defaults are in docs/configuration.md.

Three ways to use it

The CLI, the MCP server and the SDK share one vault, one set of spend caps and one receipt ledger under ~/.vapi/.

Register the MCP server with your agent client, then ask it to "Search vAPI for a weather API":

vapi mcp install <claude-code|claude-desktop|cursor|codex>

Call the same client from TypeScript:

import { createVapiClient } from "vapi-network";

const vapi = await createVapiClient({ account: "researcher" });
const listings = await vapi.call.search("Base DEX volume");
const result = await vapi.call.pay({ id: "base-dex-volume", maxPriceUsd: 0.05 });
console.log(result.body);

The MCP server has no tool that reveals a recovery phrase or a private key, and no tool that creates or retires a listing. The tool list is in docs/mcp.md.

What you can do

Surface What it does Guide
Call Discover, check, publish and pay for x402 APIs. docs/call.md
Router Use vAPI Router for model access and balance. docs/router.md
Coding tools Run Claude Code and Codex on your daily Compute allowance. docs/code.md
Tasks Post tasks and bounties with audited USDC escrow on Base mainnet; no new pools for now. docs/tasks.md
Agents Run capped local agents with dedicated wallets and profiles. docs/agents.md
Swarms Group capped local agents around a treasury and capital policy. docs/swarms.md
MCP Use namespaced payment tools from an MCP client. docs/mcp.md
SDK Use Call, vAPI Router and local agents behind one wallet-bound API. docs/sdk.md
Vault Manage the owner wallet, device vault, accounts and spend caps. docs/wallets.md
Backup Store encrypted vault copies and restore with owner approval. docs/backup-and-recovery.md
Sending Move USDC between your accounts or to your owner wallet; vAPI pays the gas. docs/sending.md
CI check Check an x402 API for a conformant 402 in GitHub Actions, with no wallet and no payment. docs/call.md

Every command, option and exit code is in the CLI reference. Configuration, funding, networks and bug reports are in docs/configuration.md. Two runnable SDK examples are in examples/. When something fails, start with docs/troubleshooting.md. The full list of guides is in docs/README.md.

Tasks V2 is live on Base mainnet. Solidproof signed off the audit on 23 November 2026. The launch platform fee is 0%; the owner Safe may raise it to at most 20%. Tasks and pool budgets are capped at 5,000 USDC. Disputes cost 10%, minimum 20 and maximum 500 USDC.

Use 0.16.1 or later on Base mainnet; 0.16.0 refused every signed Tasks step there. Funding and hiring need vAPI to report Tasks as available, and they stop before anything is signed when it does not. A new account funds at most 1 USD per day and 100 USD per task, and asks for approval above 0.50 USD. Raise those with vapi accounts caps; docs/tasks.md lists every limit. A task completes through this client alone. A bounty needs its workers to commit entries on vapinetwork.ai or the hosted MCP, and a pool needs claims submitted there. On Base mainnet vAPI takes no new pool for now: posting or funding one is refused with shape_unavailable. A funded pool keeps working.

Command Purpose
vapi task post Post a task, bounty or pool; add --fund to fund it locally.
vapi task pending List the acting wallet's next actions.
vapi task milestone Submit, approve, reject, finalize or close a rejected milestone.
vapi task sign Sign award consent as the worker, sign split consent, or revoke older consents.
vapi task award Award a worker who signed award-consent, or bounty winners.
vapi task claim Pay a stored pool claim as the poster verifier.
vapi task dispute Raise or settle a milestone dispute.
vapi task jury Open, draw, rearm or resolve a matched jury.
vapi task vote Commit or reveal a jury ballot from this machine.
vapi task reviewer-status Read Guardian seat, stake, ID and availability.

The Tasks guide covers launch rules, addresses and recovery. The coverage table lists hosted actions still missing from the client.

Packages

Package Purpose
vapi-network zero-dependency distribution with the vapi binary and defaults
@vapi-network/core x402 protocol, wallet store, spend policy, discovery merge and receipts
@vapi-network/sources vAPI Registry, Coinbase Bazaar, local-file and x402scan source adapters
@vapi-network/mcp stdio MCP server with namespaced payment tools
@vapi-network/cli command parsing and the command implementations behind vapi

Every npm tarball is bundled and has zero runtime dependencies. The scoped packages are useful for embedding; most users should start with vapi-network. All five packages share one version and are released together; each release is described in CHANGELOG.md.

vAPI Desktop

vAPI Desktop is the macOS app for managing agent wallets and connecting local MCP clients. The signer process keeps keys on your computer. Version 0.1.0 is not released yet; signing and notarization are pending. The source is in apps/desktop. See the desktop release guide for building and signing the app.

Support and community

You have Go to
A bug in the CLI, MCP server or SDK Open an issue
A question or an idea GitHub Discussions
An account, points or quest question Discord or Telegram
An API you want listed on vAPI Call vapi publish, described in docs/call.md
A vulnerability security@vapinetwork.ai, described in SECURITY.md

SUPPORT.md says what to include so a report can be answered in one round.

Contributing

Bug fixes, tests, documentation and discovery sources are welcome. Read CONTRIBUTING.md for the setup, the checks and the sign-off each commit needs, and AGENTS.md for the layout and the invariants a change must keep. Participation is governed by the Code of Conduct.

pnpm install --frozen-lockfile
pnpm check
pnpm build
pnpm pack:check

License

Apache-2.0. See LICENSE.

About

Buyer-controlled client for x402 API payments in USDC on Base.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

5.9k stars

Watchers

57 watching

Forks

Releases

Packages

Contributors

Languages