Skip to main content

1. Discover endpoints (free)

The discovery API requires no payment. Use it to explore available endpoints and pricing.
Every endpoint returns its credit rate, pricing model, supported chains, and x402 payment instructions.

2. Set up a wallet

You need a wallet with testnet USDC on Base Sepolia. You’ll use the wallet’s private key to sign x402 payments.
Never commit your private key to source control. Use environment variables or a secrets manager.

3. Install the x402 client

4. Make your first request

The x402 client handles the full payment flow: if a request gets a 402, it reads the payment instructions, signs a transaction, and retries. From your code’s perspective, it’s just a GET request.

5. Use tiers for variable-length data

Endpoints with dynamic pricing (transactions, event logs) require a tier parameter:
If your selected tier is too small for the response, you’ll get a 402 indicating the correct tier.

Response headers

Every paid response includes pricing metadata:
For dynamic-priced endpoints, you also get: