HTTP 402 Payment Required

The internet has a
payment status code.
We built the protocol.

AgentGate lets AI agents pay for any API with stablecoins on Tempo. No API keys. No subscriptions. One HTTP header.

http 402 flow
# 1. agent calls a paid endpoint
$ curl -X POST /api/execute \
  -d '{"code": "console.log(42)"}'

# 2. gateway responds with payment instructions
HTTP/1.1 402 Payment Required
X-Payment-Amount: 0.01
X-Payment-Token: pathUSD
X-Payment-Recipient: 0x00DfEe79…

# 3. agent pays pathUSD on Tempo (~2s finality)
$ curl -X POST /api/execute \
  -H "X-Payment: 0x00Df…:0.01:pathUSD:0xabc…def" \
  -d '{"code": "console.log(42)"}'

# 4. payment verified on-chain, response returned
HTTP/1.1 200 OK
{ "output": "42\n", "exitCode": 0 }
01

DISCOVER

Find services

Standard /.well-known/x-agentgate.json lists APIs, prices, and wallet addresses. Zero signup.

02

PAY

Send stablecoins

Agent gets HTTP 402, transfers pathUSD on Tempo. Instant finality, no gas fees. Memo links payment to request.

03

USE

Get the response

Gateway verifies the tx on-chain and returns the API result. One round trip. Direct P2P — no intermediary cut.

Live endpoints

Real services, real on-chain payments. Tempo testnet.

+ list yours
POST /api/chat LLM inference · Groq llama-3.3-70b
0.005 pathUSD
POST /api/execute Sandboxed code execution · TS, Python, Shell
0.010 pathUSD
POST /api/scrape Web scraping · fetch and extract content
0.005 pathUSD
POST /api/deploy Deploy HTML to a live URL
0.050 pathUSD

Integration

agent.ts pay for APIs
import { AgentGateClient } from '@tempo-agentgate/sdk' const agent = new AgentGateClient({ // Privy server wallet — no seed phrases privyAppId: 'your-app-id', privyAppSecret: 'your-secret', walletId: 'privy-wallet-id', }) // SDK handles 402 → pay → retry const res = await agent.fetch( 'https://tempo-agentgategateway-production.up.railway.app/api/execute', { method: 'POST', body: JSON.stringify({ code: 'console.log(42)', language: 'typescript', }) } )
server.ts monetize your API
import { Hono } from 'hono' import { paywall } from '@tempo-agentgate/middleware' const app = new Hono() // One line. Your API now accepts crypto. app.use('/api/*', paywall({ recipientAddress: '0xYourWallet', token: 'pathUSD', pricing: { 'POST /api/generate': { amount: '0.02', } } })) app.post('/api/generate', (c) => c.json({ result: '...' }) )

npm packages

@tempo-agentgate/sdk

Agent client. Auto 402→pay→retry. Supports raw private keys and Privy server wallets.

@tempo-agentgate/middleware

Hono middleware. One function call to paywall any route with on-chain verification.

@tempo-agentgate/core

Shared types, Tempo chain config, stablecoin addresses, payment verification utils.

$ bun add @tempo-agentgate/sdk @tempo-agentgate/middleware

Built with

Tempo
Tempo ~2s finality · $0 gas · pathUSD · passkeys
Privy
Privy server wallets · fee sponsorship
viem
viem on-chain interactions
Bun
Bun + Hono runtime

HTTP 402 was reserved in 1997
for "future use."

The future is autonomous agents with wallets.

List your API View source ↗