x402 — AI agents pay
per request, no API key
With x402, an AI agent pays in USDC for each CabalSpy API call and gets labeled KOL, Smart Money and Whale wallet data — no account, no signup, no key. The wallet is the identity, and spend limits are on by default.


















KOL data your agent can buy on its own
How it works
- The agent calls a CabalSpy endpoint. The server answers
402 Payment Requiredwith the price. - The client checks the price against your spend limits, before the wallet signs anything.
- It pays in USDC and repeats the request; the data comes back.
You get a full CabalSpy client — every endpoint, every type, every error class. Only the payment differs. Gas is sponsored by the facilitator, so you pay only the price of the call.
TypeScript
npm install cabalspy-x402import { createClient } from 'cabalspy-x402';
const cabalspy = createClient({
signer, // Solana signer
evmSigner, // Base, Polygon, Arbitrum — either or both
maxSpendTotal: '$5.00', // hard cap for this process
});
const wallet = await cabalspy.wallets.lookup('As7HjL7dzzvbRbaD3WCun47robib2kmAKRXMvjHkSMB5');
console.log(wallet.name, wallet.type); // Otta kol
console.log(cabalspy.x402.summary());
// { calls: 1, spentUsd: 0.01, remainingUsd: 4.99 }Python
pip install "cabalspy-x402[all]"from cabalspy_x402 import create_client
cabalspy = create_client(
svm_signer=signer, # Solana
max_spend_total="$5.00", # hard cap for this process
)
wallet = cabalspy.wallets.lookup("As7HjL7dzzvbRbaD3WCun47robib2kmAKRXMvjHkSMB5")
print(wallet["name"], wallet["type"]) # Otta kol
print(cabalspy.x402.summary())
# {'calls': 1, 'spent_usd': 0.01, 'remaining_usd': 4.99}An async client (create_async_client) is available for agents that already run an event loop.
Spend limits are on by default
A funded wallet handed to an autonomous agent is a standing authorisation to spend. An agent stuck in a retry loop against a paid endpoint would drain it. So both limits are active unless you turn them off:
| Limit | Default | Effect |
|---|---|---|
| Per call | $0.10 | Refuses any single call priced above it |
| Total | $10.00 | Refuses further calls once reached |
Every settled payment is reported with timestamp, amount, on-chain transaction, network and URL, so you can keep your own ledger.
Pay on Solana, Base, Polygon or Arbitrum
CabalSpy offers all four networks in the same response. Register every network you hold USDC on — a client that can only pay on one chain is turned away whenever that chain has a problem. The payment chain is independent of the data you ask for.
Test first on solana-devnet: no real money moves and the flow is identical.
Use it from any HTTP layer
import { createPaymentFetch } from 'cabalspy-x402';
const { fetch: pay, tracker } = createPaymentFetch({ signer, maxSpendTotal: '$1.00' });
const res = await pay('https://api.cabalspy.xyz/v1/signals?blockchain=solana&type=kol');What agents ask
| Who is this wallet? | wallets.lookup |
| How has this KOL performed? | wallets.tracker |
| What are KOLs buying right now? | transactions.latest |
| Was this launch bundled? | bundle.get (Solana) |
| Who still holds this token? | tokens.holders |
| Which wallets moved together? | signals.list |
Other ways to connect an agent
Frequently asked questions
01What is x402?
x402 is an open payment protocol built on the HTTP status code 402 "Payment Required". A server answers a request with a price, the client pays in stablecoin and repeats the request with proof of payment. It lets software — including AI agents — pay for an API call without an account, a subscription or an API key.
02How can an AI agent use the CabalSpy API without an API key?
Install the cabalspy-x402 client (npm install cabalspy-x402 or pip install "cabalspy-x402[all]"), give it a wallet signer funded with USDC, and call the API as usual. The client pays per request automatically. No signup, no account and no API key are needed; the wallet is the identity.
03Which chains can I pay on?
CabalSpy accepts USDC payments on Solana, Base, Polygon and Arbitrum and offers all of them in the same response. The payment chain is independent of the data: a question about a Base wallet can be paid for in Solana USDC.
04How do I stop an agent from overspending?
Spend limits are on by default: $0.10 per call and $10.00 in total per process. The price is read from the 402 response and checked before the wallet signs anything, so a request priced above the limit is refused without spending. Both limits can be changed or disabled explicitly.
05Can I test x402 without real money?
Yes. Restrict the client to a test network such as solana-devnet. No real money moves and the whole flow is identical.
06Should I use x402 or an API key?
Use x402 when an autonomous agent should pay as it goes with no account to manage. Use an API key when you want a monthly plan with predictable cost: the free tier includes 10,000 credits per month and paid plans start at $49/month. Both return the same data.
Prefer a monthly plan? Use an API key instead.
10,000 free credits every month with an API key, no credit card. x402 and API keys return the same data.
