Pay per request. No account, no API key.

Each API here answers its first request with 402 Payment Required and a price. Sign a USDC payment with any x402 client, send the request again, and the answer comes back. Every receipt on the tape is a real settlement on chain.

All payments so far, all routes

    A coin drops here each time a payment settles on chain.

    How to pay for a request

    Start with the sandbox: it takes test USDC on Base Sepolia, which you can get free from Circle's faucet. Use a throwaway key either way.

    1. Ask without paying

      The gateway answers 402. The price, the token and the address to pay are in the PAYMENT-REQUIRED header.

      curl -i "https://demo.apivend.dev/v1/balance?address=0x4C5d78BebbF28853c28eB385b936875e68107C60"
    2. Pay and ask again

      An x402 client signs a USDC authorization for exactly that price and repeats the request with it. Nothing moves until the API has answered.

      npm install @x402/fetch @x402/evm viem
      
      import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
      import { ExactEvmScheme } from "@x402/evm";
      import { privateKeyToAccount } from "viem/accounts";
      
      const account = privateKeyToAccount(process.env.X402_PRIVATE_KEY);
      const pay = wrapFetchWithPaymentFromConfig(fetch, {
        schemes: [{ network: "eip155:84532", client: new ExactEvmScheme(account) }], // Base Sepolia only
      });
      const res = await pay("https://demo.apivend.dev/v1/balance?address=0x4C5d78BebbF28853c28eB385b936875e68107C60");
      console.log(await res.text());

      The snippets pay on Base Sepolia only (eip155:84532), so the key next to them cannot pay real USDC by mistake. Agents with a wallet pay the same way, for example through Coinbase's Payments MCP or Cloudflare's Agents SDK.

    3. Find your receipt

      The answer comes first and the payment settles about a second later, so PAYMENT-RESPONSE has no transaction yet. Once it settles it prints on the tape with a link to the transaction, and /api/feed?payer= with your address lists your own payments.

    What runs this page

    This page is a reference deployment of apivend, the open-source payment gateway these APIs sit behind. The APIs themselves are ordinary HTTP services with no payment code.

    Gateway
    Envoy Gateway with apivend's x402 filter. It prices each route and checks every payment before the request reaches the API.
    Prices
    A PaymentPolicy per route, kept in Kubernetes. Changing a price takes effect in under a second.
    Cluster
    A single-node Kubernetes cluster (k3s), deployed from git by Flux.
    Settlement
    Coinbase's facilitator on Base. The sandbox uses the free x402.org facilitator.
    Chain reads
    Balances and blocks straight from Base over RPC. No payment is served on old data.