Settings

Theme

Replacing API keys with payments (HTTP 402 / x402)

apiosk.com

2 points by ollybrinkman 20 days ago · 1 comment

Reader

ollybrinkmanOP 20 days ago

Hi HN — I’m building a payment-native API gateway for AI agents and developers.

API keys and subscriptions don’t work well for autonomous software: they require accounts, secrets, and prior trust before a single request can be made.

This gateway flips that model. Instead of authenticating, clients pay per request using HTTP 402 + x402. No API keys, no accounts, no Stripe integration for providers.

How it works: • The gateway proxies any existing API • Paid endpoints return 402 Payment Required • The client (or agent) attaches a USDC payment • The request is replayed and forwarded upstream

Current features: • OpenAI-compatible proxy mode • Provider dashboard for endpoints + pricing • Curl + SDK examples for agents • Runs as a single Rust binary or Docker

I’m looking for: • API providers who want to monetize endpoints without building billing/auth • Agent / LLM developers who want APIs that charge per tool call instead of monthly plans

Happy to answer technical questions — especially around latency, trust model, and failure modes.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection