Testnet faucet (try x402 free)
POST /api/testnet-fundFund any address with testnet money via the Coinbase faucet - USDC (1) or ETH (0.0001) on Base Sepolia, USDC (1) or SOL on Solana devnet - everything an agent needs to rehearse the complete x402 payment loop safely before moving real money. A tenth of a cent buys a full testnet dollar. Limits: 2 drips per address per day; CDP enforces its own rolling caps on top.
Input
| Field | Type | Description |
|---|---|---|
address * | string | Address to fund - EVM 0x… or Solana base58, matching the network |
network | string | base-sepolia (default) | solana-devnet |
token | string | usdc (default, 1 USDC) | eth (0.0001, base-sepolia) | sol (solana-devnet) |
Example output
{
"funded": true,
"network": "base-sepolia",
"token": "usdc",
"transactionHash": "0xabc123…",
"explorer": "https://sepolia.basescan.org/tx/0xabc123…"
}
Try it - see the 402 challenge (free)
curl -i -X POST https://agent402.tools/api/testnet-fund \
-H "Content-Type: application/json" \
-d '{"address":"0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0","token":"usdc"}'
The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/testnet-fund", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"address": "0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0",
"token": "usdc"
}),
});
Related tools
Wallet token balances (indexed)
GET /api/wallet-balancesAll token balances for any address in one call, from Coinbase's indexed data API - ERC-20 + native on EVM, SPL on Solana…
try in playground →Onramp link (fund a wallet with a card)
POST /api/onramp-linkGenerate a single-use Coinbase Onramp URL that lets a human fund any wallet with a card or Apple Pay - the fastest way t…
try in playground →Onchain SQL (query Base with SQL)
POST /api/onchain-sqlRun read-only SQL against Coinbase's indexed, DECODED blockchain data - base.events (decoded logs with parameters), base…
try in playground →