Show HN: X402-express. Pay-per-call HTTP 402 middleware for AI agents on Base L2 (github.com)

🤖 AI Summary
M2MCent has launched an innovative pay-per-call middleware, x402-express, which allows AI agents to monetize APIs effortlessly with just three lines of code. Utilizing the x402 Payment Protocol, inspired by HTTP 402, this lightweight payment interceptor facilitates seamless interactions between agents and servers, enabling API endpoints to require payments in USDC. The integration is straightforward, involving the installation of the m2mcent-sdk and implementing a few parameters to protect any Express endpoint with a paywall, allowing for micro-transactions in real-time without retaining agent data post-settlement. This development is significant for the AI/ML community as it opens new avenues for monetizing AI applications, particularly in decentralized contexts where payment must be atomic and efficient. M2MCent's non-custodial approach ensures direct fund transfers from payers to the treasury via an escrow contract, while also leveraging gasless transactions for payers through EIP-3009. With over 100 production Model Context Protocol servers already utilizing this middleware on Base Mainnet, x402-express is setting a precedent for AI-to-AI commerce, thus expanding the operational capabilities of machine learning applications and their integration into commercial frameworks.
Loading comments...
loading comments...