This quickstart takes you from nothing to a real paid x402 call. The only prerequisite is a crypto wallet with a small amount of USDC on Base.
Before funding anything, confirm the endpoint works with a free trial call:
# Free trial call — real data, no payment, no signup (1/endpoint/hour): curl "https://2s.io/api/weather/zip?zip=94103&trial=1"
Get a little USDC into an EVM wallet on Base (a few cents covers thousands of calls). You only need the wallet private key in your environment — there is no 2s account to create. Keep the key in an env var like EVM_PRIVATE_KEY.
The SDK handles probe, signing, and retry. TypeScript:
// npm i @2sio/sdk
import { TwoS } from '@2sio/sdk'
// Fund any EVM wallet with a little USDC on Base. No signup, no API key.
const client = new TwoS({ privateKey: process.env.EVM_PRIVATE_KEY as `0x${string}` })
const res = await client.weather.zip({ zip: '94103' })
console.log(res.data) // real National Weather Service forecast
console.log(res.costUsd) // what this call cost, in USDC
console.log(res.settlement?.txHash) // on-chain settlement txOr Python:
# pip install 2sio
import os
from twosio import TwoS
client = TwoS(private_key=os.environ["EVM_PRIVATE_KEY"])
res = client.weather.zip(zip="94103")
print(res.data) # real forecast
print(res.cost_usd) # USDC charged
print((res.settlement or {}).get("tx_hash"))The exact same client works across the whole catalog — swap weather.zip for any endpoint. Browse them in the API list, or point an MCP host at the catalog so your agent can call any endpoint on demand.
Call a live x402 API right now — no signup.
Browse the full endpoint directory, grab the quickstart, or read the llms.txt manifest. Every endpoint is keyless and pay-per-call.