x402 · April 2026 · SideGuy Dev Notes

x402: Pay Per Request.
No Subscription. No API Key.

HTTP 402 was reserved for "Payment Required" since 1991 and never used — until now. x402 is the open protocol that lets any API charge per request using crypto. Flagged by Toby in our April 13 session as the next rail to wire into SideGuy's TTS engine.

Protocol spec: live (Coinbase x402) USDC on Base: ~$0.001 per tx SideGuy TTS gating: coming Wallet address: pending
How it works
1
Request hits API
User calls the endpoint — no API key, no account needed.
2
402 returned
API responds with HTTP 402 + payment details: amount, token, wallet address, chain.
3
Client pays
Client sends USDC (or USDT) on Base. Transaction takes ~1 second. Cost: fractions of a cent.
4
API unlocks
API verifies the on-chain payment and returns the real response. No signup required.

What a 402 response looks like

When your client hits an x402-gated endpoint without payment, it gets this back:

HTTP/1.1 402 Payment Required
X-Payment-Required: true
X-Payment-Amount: "0.001"
X-Payment-Token: "USDC"
X-Payment-Chain: "base"
X-Payment-Recipient: "0xYourWalletAddress"
X-Payment-Memo: "tts-request-april-2026"

Your client reads those headers, signs a transaction with connected wallet (or auto-pays if pre-authorized), then replays the original request with a X-Payment-Proof header. API verifies on-chain and responds normally.

Why this beats API keys

No key management. API keys get leaked, rotated, stolen, rate-limited. x402 has no server-side secret to protect — the money IS the credential.

No subscriptions. You pay for exactly what you use. A single TTS request that costs $0.001 doesn't require a $20/mo plan.

Anyone can access it. As long as a user has a wallet with USDC, they can hit the API. No account, no OAuth, no friction.

Built for these scenarios
🔊
TTS per request
Gate OpenAI TTS calls via pocket-tts proxy. Charge $0.001 per synthesis — PJ's key stays server-side, cost is covered by the caller.
🤖
AI API metering
Any LLM endpoint can return a 402. Ideal for demos, one-off generations, or usage-based AI tooling without auth walls.
📄
Pay-per-page content
Gate a report, PDF, or decision packet behind a $0.05 micropayment. No Stripe setup, no checkout flow.
🔌
Serverless function metering
Deploy a Vercel/Netlify function that 402s on every hit. Anyone can call it, as long as they can pay the ~1¢ toll.

How x402 wires into SideGuy's TTS engine

SideGuy uses a two-tier TTS system: OpenAI API endpoint (Tier 1) + browser speech synthesis fallback (Tier 2). The problem: exposing PJ's API key client-side is a security hole. The pocket-tts proxy solves this — and x402 makes it self-funding.

# Current plan (pocket-tts + x402)

User visits page
  → hits /tts serverless proxy endpoint
  → proxy returns 402 with USDC payment request
  → user's wallet auto-pays $0.001
  → proxy proxies to OpenAI TTS with PJ's key
  → audio streams back to user

PJ's key never touches the client. Usage is self-funding. No subscription needed. x402 is the missing piece between "great TTS quality" and "zero friction for end users."

Want to wire x402 into your API or product?

Text PJ — SideGuy is implementing this now. If you're building something that needs per-request payments without auth walls, let's talk.

💙 Venmo PJ 💬 Text PJ
Text PJ
Text PJ
858-461-8054
💬 Text PJ