When GPTBot, ClaudeBot, or any known AI crawler hits your site, it gets an HTTP 402 with payment requirements. If it pays (USDC on Base), it gets the content. If not, it gets nothing.
Normal users are never affected.
How it works: - Crawler detected by User-Agent → 402 response with price and wallet address
- Crawler signs a USDC payment (EIP-3009) and retries with X-PAYMENT header
- Plugin forwards to x402.org facilitator → on-chain settlement on Base
- USDC goes directly from crawler's wallet to yours
- Content served
Configuration is a few lines in the Caddyfile:
x402 {
pay_to 0xYOUR_WALLET
price 0.05
network base
exempt /robots.txt
}
It's running on my site right now. No payments yet since most crawlers don't support x402, but they get blocked with a proper 402 instead of getting free content. When they do adopt it, the infrastructure is ready.
Built with pure Go (no CGo), SQLite audit trail, Cloudflare-compatible headers.
ollybrinkman•1h ago
The idea is the same: use HTTP 402 as real payment infrastructure, not just a status code that never got used.
We have 16 live APIs (weather, prices, news, PDF generation, etc.) that agents can call without any API keys — just a wallet.
https://apiosk.com
paolobietolini•1h ago