1
Top up your wallet
Send SOL to the gateway wallet address to create a pending API key balance:The gateway listens for your transfer via a Helius webhook. Once confirmed, a pending claim is created for your wallet address. You do not need to wait for a notification; the claim endpoint will tell you when your key is ready.
2
Fetch a challenge
Request a random 32-byte challenge from the gateway. You will sign this value to prove ownership of your wallet.Expected response:
3
Sign the challenge
Use
@solana/web3.js and tweetnacl to sign the challenge with your keypair. The signature must be base58-encoded.4
Claim your API key
POST the wallet address, base58 signature, and challenge back to the gateway.Success response:
5
Use your key on paid endpoints
Pass the key in the
x-api-key header on every paid request:Full end-to-end script
Here is a complete TypeScript script you can run withtsx or ts-node:
Error handling
Result
You now have a credit-metered API key tied to your Solana wallet. Every paid call debits your balance by 0.0022 SOL (2,200,000 lamports). You also receive 50 lifetime free calls and 15 free calls per day before credits are consumed.Next steps
- Decode a transaction to turn raw signatures into LLM-friendly summaries
- MCP Integration to connect the gateway to Claude Desktop or Cursor