- Free Tier — Sign a message with your wallet (100 free calls)
- x402 Payment — Pay-per-request after free tier (automatic fallback)
Free Tier (Recommended Start)
Every wallet gets 100 free API calls to paid endpoints. No payment required — just prove you own a wallet.How wallet verification works
You sign a timestamped message with your wallet’s private key. We verify the signature matches the claimed address.1
Generate timestamp
Get current Unix timestamp (seconds since epoch).
2
Sign the message
Sign
memoclaw-auth:{timestamp} with your wallet’s private key.3
Send the header
Include
x-wallet-auth: {address}:{timestamp}:{signature} in your request.4
We verify
We cryptographically verify the signature matches the address. If valid and you have free calls remaining, the request proceeds.
Code example
Check your free tier status
Timestamps must be within 5 minutes of server time to prevent replay attacks.
Your private key never leaves your machine — only the signature is sent.
x402 Payment (After Free Tier)
Once you’ve used your 100 free calls, requests automatically require x402 payment.How it works
1
Client sends request
Client sends a request to a protected route with no payment header.
2
Server returns 402
Server responds with HTTP
402 Payment Required, including payment requirements — USDC amount and receiving address.3
Client pays and retries
Client pays USDC on Base and retries the request with an
X-PAYMENT header containing the signed payment proof.4
Server verifies payment
Server verifies the payment and extracts the payer wallet address from the EIP-3009 or Permit2 payload.
5
Identity established
Server auto-creates a user if needed. Your wallet address scopes all your memories — wallet A cannot see wallet B’s data.
Your wallet address is extracted from the payment proof. It becomes your user identity and scopes
all your memories. No registration needed.
Payment methods
Two EVM payment signature types are supported:- EIP-3009 —
transferWithAuthorization - Permit2 — Uniswap’s permit-based transfer
Making authenticated requests
Three options for making authenticated requests:-
@x402/fetch — JavaScript SDK
-
@x402/cli — CLI tool
- Direct signing — Construct payment headers manually. See x402.org/docs for the full specification.