x402 wallet authentication uses three open standards:
- SIWE (Sign-In With Ethereum): Your agent authenticates by signing a message with an EVM wallet.
- SIWS (Sign-In With Solana): Adapted from EIP-4361 for Solana's ed25519 signatures. Your agent authenticates with a Solana wallet.
- x402: An open protocol for HTTP-native payments. When your agent's credits run out, the server responds with HTTP 402, your agent purchases more credits and retries the request. Zero protocol fees.
When your agent needs to access Alchemy APIs without an API key, it handles the full wallet authentication flow:
- Wallet setup: Your agent creates a new wallet or imports an existing one. You choose between an EVM wallet (USDC on Base) or a Solana wallet (USDC on Solana).
- Authentication: Your agent generates a signed auth token using SIWE (EVM) or SIWS (Solana) and includes it in every API request.
- Credits: Your agent purchases 1 USDC worth of credits from your wallet. When credits run out, the server responds with HTTP 402, and your agent purchases another 1 USDC of credits automatically.
Your wallet type only determines authentication and payment. Either wallet type can query any chain across all networks Alchemy supports.
All standard Alchemy APIs are available through the x402 gateway:
- Node RPC: Standard Ethereum JSON-RPC methods (
eth_*) plus Alchemy-enhanced methods, across 100+ chains - Token API: Token balances, metadata, and allowances
- NFT API: NFT ownership, metadata, sales, and spam detection
- Transfers API: Asset transfer history with filtering
- Prices API: Spot and historical token prices
- Portfolio API: Multi-chain balances and portfolio data
- Simulation API: Transaction simulation and outcome prediction
These are the same APIs available with a standard API key. The only difference is the authentication and payment mechanism.
| EVM wallet | Solana wallet | |
|---|---|---|
| Standard | SIWE (EIP-4361) | SIWS |
| Signature | secp256k1 | ed25519 |
| Payment | USDC on Base | USDC on Solana |
| Queryable chains | All supported networks | All supported networks |
Install the agentic-gateway agent skill so your AI coding agent learns this flow automatically:
npx skills add alchemyplatform/skills --yesYour agent will walk you through wallet setup and handle authentication and payments from there.