x402 API Gateway Base Network

Pay-Per-Call API Access
for AI Agents

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

37
API Services
~9,700
Upstream Endpoints
$0.001
Starting Price (USDC)
0
API Keys Needed
Base
Network (eip155:8453)

What is the httpay.xyz x402 API Gateway?

The 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.

How x402 Payment Works
Four steps, fully automated with an x402-compatible client
1

Request

Agent sends GET /api/gateway/{service}/{path}

2

402 Response

Gateway returns payment requirements: USDC amount, address, network

3

Pay with USDC

Agent signs EIP-3009 transferWithAuthorization — no gas needed

4

Data Delivered

Gateway verifies on Base, proxies upstream, returns response

🏦 Payment Address: 0x5f5d6FcB315871c26F720dc6fEf17052dD984359 on Base  |  Asset: USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)  |  Facilitator: CDP (Coinbase Developer Platform)
Quick Start for AI Agents
Multiple integration options — choose what works for your agent
MCP Server
x402-fetch (JS)
cURL (demo)
Python
# 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"}]}
)
Authentication Model
Gateway auth vs. upstream auth — two separate concerns
🔐 Gateway auth (x402): You pay USDC on Base for each request. This is handled by your x402 client automatically. No account needed with httpay.xyz.
🗝️ Upstream auth (your keys): For APIs that require authentication (GitHub, OpenAI, Stripe, etc.), pass your own API key via the X-Upstream-Token header. The gateway forwards it to the upstream API. We never store your keys.
🌐 Public APIs (no key needed): Weather (NWS), Wikipedia, blockchain RPCs, and demo petstore require no upstream token — just the x402 payment.
All 37 Gateway Services
Access pattern: GET|POST https://httpay.xyz/api/gateway/{key}/{upstream-path}
Key
Description & Host
Category
Price
Auth
github
GitHub REST API v3
api.github.com — repos, issues, PRs, users, gists (~1,080 endpoints)
Developer Tools
$0.001
token
gitlab
GitLab API v4
gitlab.com/api/v4 — projects, merge requests, CI/CD (~72 endpoints)
Developer Tools
$0.001
bearer
vercel
Vercel API
api.vercel.com — deployments, projects, domains, teams (~231 endpoints)
Developer Tools
$0.001
bearer
postman
Postman API
api.getpostman.com — collections, environments, workspaces
Developer Tools
$0.001
apikey
cloudflare
Cloudflare API
api.cloudflare.com/client/v4 — DNS, Workers, KV, Pages, R2 (~2,591 endpoints)
Cloud
$0.002
bearer
digitalocean
DigitalOcean API
api.digitalocean.com/v2 — droplets, Kubernetes, databases, spaces (~545 endpoints)
Cloud
$0.002
bearer
flyio
Fly.io Machines API
api.machines.dev/v1 — app VMs, deploys, secrets
Cloud
$0.001
bearer
render
Render API
api.render.com/v1 — web services, cron jobs, databases
Cloud
$0.001
bearer
discord
Discord HTTP API v10
discord.com/api/v10 — channels, messages, guilds, bots (~227 endpoints)
Communication
$0.001
bot token
slack
Slack Web API
slack.com/api — messages, channels, users, files (~174 endpoints)
Communication
$0.001
bearer
twilio
Twilio REST API
api.twilio.com — SMS, voice calls, messaging services
Communication
$0.002
basic
resend
Resend Email API
api.resend.com — transactional emails, domains, templates
Communication
$0.001
bearer
pagerduty
PagerDuty API
api.pagerduty.com — incidents, schedules, services, escalations (~390 endpoints)
DevOps
$0.001
token
sentry
Sentry API
sentry.io/api/0 — issues, events, projects, releases (~212 endpoints)
DevOps
$0.001
bearer
datadog
Datadog API v2
api.datadoghq.com/api/v2 — metrics, logs, dashboards, monitors
DevOps
$0.002
apikey
circleci
CircleCI API v2
circleci.com/api/v2 — pipelines, workflows, jobs, artifacts
DevOps
$0.001
token
openai
OpenAI API
api.openai.com/v1 — chat, completions, embeddings, images, assistants
AI/ML
$0.005
bearer
openrouter
OpenRouter API
openrouter.ai/api/v1 — 200+ LLMs via unified OpenAI-compatible API
AI/ML
$0.003
bearer
huggingface
Hugging Face Hub API
huggingface.co/api — models, datasets, spaces, inference (~203 endpoints)
AI/ML
$0.001
bearer
notion
Notion API
api.notion.com/v1 — pages, databases, blocks, users, search
Productivity
$0.001
bearer
asana
Asana API 1.0
app.asana.com/api/1.0 — tasks, projects, workspaces, users
Productivity
$0.001
bearer
jira
Jira Cloud API v3
jira.atlassian.com/rest/api/3 — issues, projects, sprints, boards
Productivity
$0.001
basic
stripe
Stripe API
api.stripe.com/v1 — charges, customers, subscriptions, invoices, payouts
Payments
$0.002
basic
spotify
Spotify Web API
api.spotify.com/v1 — tracks, playlists, artists, albums, search
Media
$0.001
bearer
supabase
Supabase Management API
api.supabase.com/v1 — projects, databases, functions, storage
Database
$0.001
bearer
turso
Turso Platform API
api.turso.tech/v1 — databases, groups, tokens, organizations
Database
$0.001
bearer
neon
Neon API
console.neon.tech/api/v2 — serverless Postgres projects, branches, endpoints
Database
$0.001
bearer
weather
US Weather (NWS) API
api.weather.gov — forecasts, alerts, stations, observations. No upstream auth needed (~60 endpoints)
Data
$0.001
none
wikipedia
Wikimedia REST API
en.wikipedia.org/api/rest_v1 — page summaries, search, related articles, media
Data
$0.001
none
petstore
Swagger Petstore Demo
petstore3.swagger.io/api/v3 — sample REST API for testing (~19 endpoints)
Demo
$0.001
none
eth-ankr
Ethereum RPC (Ankr)
rpc.ankr.com/eth — JSON-RPC 2.0: eth_*, net_*, debug_*, trace_*
Blockchain RPC
$0.001
none
eth-cloudflare
Ethereum RPC (Cloudflare)
cloudflare-eth.com — Cloudflare-hosted Ethereum JSON-RPC endpoint
Blockchain RPC
$0.001
none
eth-publicnode
Ethereum RPC (PublicNode)
ethereum-rpc.publicnode.com — high-availability Ethereum RPC
Blockchain RPC
$0.001
none
eth-base
Base RPC (mainnet)
mainnet.base.org — official Base L2 JSON-RPC endpoint (eip155:8453)
Blockchain RPC
$0.001
none
eth-optimism
Optimism RPC (mainnet)
mainnet.optimism.io — OP Mainnet JSON-RPC endpoint (eip155:10)
Blockchain RPC
$0.001
none
eth-arbitrum
Arbitrum One RPC
arb1.arbitrum.io/rpc — Arbitrum One JSON-RPC endpoint (eip155:42161)
Blockchain RPC
$0.001
none
eth-polygon
Polygon RPC (mainnet)
polygon-rpc.com — Polygon PoS JSON-RPC endpoint (eip155:137)
Blockchain RPC
$0.001
none

Why AI Agents Need a Pay-Per-Call API Gateway

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.

Technical Specifications
For developers integrating the x402 API gateway
// 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
Frequently Asked Questions
What is the x402 protocol?

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.

Do I need to sign up or create an account?

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.

How does authentication work for services like GitHub or OpenAI?

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.

What's the demo mode?

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.

Which blockchain RPCs are available?

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.

Is this the same as the httpay.xyz native API endpoints?

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.