One USDC micropayment unlocks any of 37 major APIs — GitHub, OpenAI, Stripe, Slack, Discord, blockchain RPCs, weather data, and more. No API keys to manage. No subscriptions. Fully permissionless.
Demo mode free: append ?demo=true to any request
Full JSON catalog of all gateway services with pricing, auth types, and endpoint counts.
GET /api/gatewayLLM-optimized instructions for integrating x402 payments into any AI agent workflow.
GET /agent.mdStructured plain-text index following the llms.txt convention for model context.
GET /llms.txtThe httpay.xyz x402 API Gateway is a permissionless API access layer built on the x402 payment protocol and deployed on the Base network (eip155:8453). It allows AI agents, autonomous bots, and developer tools to access 37 major third-party APIs using USDC micropayments — without requiring API keys, OAuth flows, or monthly subscriptions.
Each request costs between $0.001–$0.005 USDC. The x402 protocol handles the
payment handshake automatically: your agent receives a 402 Payment Required response,
signs a USDC transferWithAuthorization (EIP-3009), and re-sends the request with
an X-PAYMENT header. The gateway verifies the payment on-chain via the
CDP Facilitator on Base and proxies your request to the upstream API.
This is an agent API marketplace — designed specifically for AI agents that need data APIs, automated pipelines that can't manage API keys, and developers who want instant API access without sign-up friction. It's part of the broader x402 services ecosystem on Base.
Agent sends GET /api/gateway/{service}/{path}
Gateway returns payment requirements: USDC amount, address, network
Agent signs EIP-3009 transferWithAuthorization — no gas needed
Gateway verifies on Base, proxies upstream, returns response
0x5f5d6FcB315871c26F720dc6fEf17052dD984359 on Base |
Asset: USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) |
Facilitator: CDP (Coinbase Developer Platform)
# Option A — MCP (recommended for Claude, GPT, any LLM agent) # Add to your MCP config — no x402 code required { "mcpServers": { "httpay": { "command": "npx", "args": ["@httpay/mcp"] } } } # The MCP server exposes all 37 gateway services as tools. # Your agent can call: use_tool("github_repos", {user: "octocat"}) # Payment handled automatically from your configured USDC wallet.
// Option B — x402-fetch for Node.js / TypeScript agents import { createWalletClient, http } from 'viem' import { base } from 'viem/chains' import { wrapFetchWithPayment } from 'x402-fetch' const wallet = createWalletClient({ account: privateKeyToAccount(process.env.PRIVATE_KEY), chain: base, transport: http() }) const fetch402 = wrapFetchWithPayment(fetch, wallet) // US Weather — no auth needed const weather = await fetch402( 'https://httpay.xyz/api/gateway/weather/points/39.7456,-104.9994' ) // GitHub repos — pass your token via X-Upstream-Token const repos = await fetch402( 'https://httpay.xyz/api/gateway/github/users/octocat/repos', { headers: { 'X-Upstream-Token': 'ghp_yourtoken' } }) // Base RPC via JSON-RPC const block = await fetch402( 'https://httpay.xyz/api/gateway/eth-base/', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ jsonrpc: '2.0', method: 'eth_blockNumber', params: [], id: 1 }) })
# Free demo mode — no payment required (rate-limited per IP) # Append ?demo=true to any gateway endpoint # Weather data (public API, no auth) curl "https://httpay.xyz/api/gateway/weather/points/39.7456,-104.9994?demo=true" # Wikipedia article summary curl "https://httpay.xyz/api/gateway/wikipedia/page/summary/Bitcoin?demo=true" # List all 37 gateway services (always free) curl "https://httpay.xyz/api/gateway" # With real x402 payment (requires X-PAYMENT header) curl -H "X-PAYMENT: <base64-encoded-payment-payload>" \ -H "X-Upstream-Token: ghp_yourtoken" \ "https://httpay.xyz/api/gateway/github/users/octocat/repos"
# Python — using x402-python client from x402 import create_payment_client from eth_account import Account account = Account.from_key(os.environ["PRIVATE_KEY"]) client = create_payment_client(account, chain="base") # Weather data (no upstream auth needed) resp = client.get( "https://httpay.xyz/api/gateway/weather/points/39.7456,-104.9994" ) # GitHub with token resp = client.get( "https://httpay.xyz/api/gateway/github/users/octocat", headers={"X-Upstream-Token": "ghp_yourtoken"} ) # OpenAI via gateway (bring your own OpenAI key) resp = client.post( "https://httpay.xyz/api/gateway/openai/chat/completions", headers={"X-Upstream-Token": "sk-yourkey"}, json={"model": "gpt-4o-mini", "messages": [{"role": "user", "content": "Hello"}]} )
X-Upstream-Token header. The gateway forwards it to the upstream API. We never store your keys.
GET|POST https://httpay.xyz/api/gateway/{key}/{upstream-path}Traditional APIs require OAuth flows, API key management, monthly subscriptions, and human-in-the-loop account creation. This fundamentally breaks autonomous AI agents — a Claude agent can't fill out a signup form, and a GPT function-calling workflow can't manage rotating API keys across 37 services.
The x402 protocol solves this with USDC micropayments on Base. An AI agent with a funded wallet can make pay-per-call API requests to any service without pre-registration. The gateway acts as a credentialed proxy: the agent pays x402, and the gateway handles the upstream auth (using the agent's own token via X-Upstream-Token).
This is what a native agent API marketplace looks like in practice: permissionless API access where money replaces identity verification. If you can pay USDC, you can call any API. No accounts. No rate-limit tiers. No billing portals. Just x402 services on Base, one micropayment at a time.
// Gateway endpoint pattern Base URL: https://httpay.xyz Pattern: ANY /api/gateway/{service}/{upstream-path} Methods: GET, POST, PUT, PATCH, DELETE // Payment (x402 protocol) Protocol: x402 v1 Network: Base (eip155:8453) Asset: USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 PayTo: 0x5f5d6FcB315871c26F720dc6fEf17052dD984359 Facilitator: https://api.cdp.coinbase.com/platform/v2/x402 Price range: $0.001 – $0.005 USDC per request // Headers X-PAYMENT: <base64 x402 payment payload> X-Upstream-Token: <your upstream API key> // required for auth services // Discovery Machine-readable: GET https://httpay.xyz/api/gateway Bazaar discovery: GET https://httpay.xyz/.well-known/x402-bazaar.json x402scan: GET https://httpay.xyz/.well-known/x402 Agent context: GET https://httpay.xyz/agent.md LLM index: GET https://httpay.xyz/llms.txt
x402 is an open payment protocol for the HTTP layer. It revives the dormant 402 Payment Required HTTP status code with a standardized micropayment flow using USDC on EVM chains. When an agent hits an x402 endpoint, it receives payment requirements, signs an EIP-3009 USDC authorization, and re-sends the request with an X-PAYMENT header. The server verifies and settles the payment on-chain.
No. The gateway is fully permissionless. You only need a Base wallet with some USDC. The x402 payment acts as your authentication. No registration, no API keys from us, no email address required.
Two layers: (1) You pay USDC to httpay.xyz via x402. (2) For APIs that require upstream auth, you pass your own API key in the X-Upstream-Token header. The gateway appends it to the upstream request in the correct format (Bearer, token, basic, etc). We never store or log your upstream tokens.
Append ?demo=true to any gateway URL to make a free test request (rate-limited per IP). Demo mode works for public APIs (weather, Wikipedia) without any payment or upstream token. Great for testing your integration before going live.
Seven public EVM RPCs: Ethereum (Ankr, Cloudflare, PublicNode), Base mainnet, Optimism, Arbitrum One, and Polygon PoS. All use JSON-RPC 2.0. No upstream auth required — just the x402 USDC payment. Perfect for agents that need on-chain data without managing RPC provider accounts.
The gateway is one part of httpay.xyz. The platform also has 280+ native endpoints for crypto data (live token prices, DeFi yields, wallet analysis, ENS lookup, web scraping, AI-powered analysis, and more). The gateway proxies external APIs; the native endpoints are built by httpay.xyz directly. See the main page for the full catalog.