Show HN: Caddy plugin that charges AI crawlers real USDC to access your site(github.com)
github.com
Show HN: Caddy plugin that charges AI crawlers real USDC to access your site
https://github.com/paolobietolini/caddy-x402
2 comments
This is a great approach. We built something complementary — Apiosk is an API gateway where AI agents pay per request using USDC on Base via x402.
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
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
piggybacking on my post
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
Built with pure Go (no CGo), SQLite audit trail, Cloudflare-compatible headers.