Summary
x402 APIs charge a small on-chain fee per call, often in stablecoin. Your agent can list services, dry-run a request to show price and chain, then attach EIP-3009 payment when you approve. The account must be deployed: verification uses ERC-1271 signature checks on the contract bytecode. A common pattern is a paid token-metadata lookup before a swap so you are not guessing from an address alone.
Ask your agent
Confirm my Elytro wallet is live on-chain, not just a predicted address. Some paid API flows need that first. If it isn't deployed yet, help me deploy. Then show me which paid APIs I can use through Elytro.
Before I swap, preview this paid token lookup URL (full contract address in the path). Show what it would cost, which chain, and what I'm buying. No payment until I ok it.
What do I get from this x402 call vs what actually hits the chain? Keep it short.
Ok, make the paid call for real on the same URL. Show the response (name, symbol, decimals, listing if present) and what I paid so I can sanity-check cost.
Can we skip the fee? If you can resolve the token without paying, do that first and compare to the paid result.
Before you approve
- Account is deployed (EIP-3009 needs ERC-1271).
- The dry-run price makes sense: amount, token, and chain.
- Contract in the URL is the token you want. Full address, not a shortened preview.
- This is real spend from your wallet for the API call, separate from any swap or sponsored gas.
If something goes wrong
- 402 or payment error: raw error JSON. Balance and chain should match the dry-run.
- Bad metadata: compare full contract addresses. Don't trust truncated 0x previews.
Further reading
- Demos (x402 demo)
- Bridge and swap tokens (often where you use token lookup)
- CLI reference (
request,services)
FAQ
- Is this only for CoinGecko?
- No. Any x402 service: dry run, read it, then pay. Token metadata is just the example here.
- Why pay when I could use a free indexer?
- A paid endpoint can return verified or richer data (e.g. listing status) that a free indexer might not guarantee. Whether the fee is worth it depends on what you are about to do with the result.