Summary
Pay.sh is a new developer CLI tool built on Solana that turns HTTP 402 Payment Required into a working payment layer for AI agents and command-line tools. Rather than requiring API keys or account-based billing, Pay intercepts 402 responses from payment-gated APIs, constructs a stablecoin payment proof signed by a local wallet, and retries the request automatically — transparent to the end user.
In this tutorial, Bri walks through the consumer side of the Pay ecosystem: installing the CLI via Homebrew, configuring a local wallet with Touch ID keychain support, and funding it for on-chain payments. She demonstrates the difference between a plain curl request — which gets blocked with a 402 error — and a `pay curl` request that completes successfully, then uses the Pay payment debugger UI to inspect the full challenge-payment-response flow in real time.
The most compelling demo shows Pay integrated directly with Claude Code via `pay claude`, where the agent autonomously calls the Google Places API at $1 per text search to retrieve live restaurant data, funding the API call from the Pay wallet without any manual key management or billing setup. This positions Pay as practical infrastructure for agentic workflows where AI agents need to access paid APIs programmatically — particularly relevant as more APIs move toward per-request pricing rather than subscription tiers.
📺 Source: bri · Published May 07, 2026
🏷️ Format: Tutorial Demo







