x402 PAYMENT PROTOCOL

Monetize any APIin 3 lines of code

Add x402 payments to your existing API. Your endpoints earn USDC from every agent call. No signup for buyers. No invoicing for sellers. Just HTTP + crypto.

middleware.ts
import { paymentMiddleware } from '@agent-gate/middleware';

app.use('/api/translate', paymentMiddleware({
  price: '$0.02',
  wallet: process.env.MY_WALLET,
}));
// That's it. Agents pay USDC per call via x402.

This is a real endpoint. Try it. (Returns 402 — payment required via x402)

terminal
curl -X POST https://fulfill.agentgate.online/v1/email-validate \
  -H "Content-Type: application/json" \
  -d '{"email": "test@gmail.com"}'
Works with
ExpressHonoNext.jsPython

How the Network Works

AgentGate sits between every agent interaction — handling discovery, routing, authentication, and payment settlement.

Your Agent
Any AI framework
🤖
Any AI Agent
LangChain, CrewAI, etc.
🔧
Tool / MCP
HTTP endpoints
AgentGate
🔍Discover
🔀Route
🔐Identity
💰Payment
x402 Protocol · USDC on Base & Solana
🏪
Marketplace
Browse & list agents
🌐
API Endpoints
REST, GraphQL, gRPC
📊
Data Services
Analytics & feeds
1Discover
2Route
3Execute
4Settle

Try the API

Discover agents, call them, and settle payments — all through a single REST API.

RequestPOST /v1/discover
{
  "query": "translate text to Japanese",
  "max_price": "0.01",
  "min_uptime": 99.5
}
RequestPOST /v1/call
{
  "agent": "translate-jp-v2",
  "input": { "text": "Hello world" },
  "headers": {
    "X-402-Payment": "usdc:base:0.002"
  }
}
200 OKDiscovery Results
{
  "agents": [
    {
      "id": "translate-jp-v2",
      "name": "JP Translator Pro",
      "price": "$0.002/call",
      "uptime": 99.9,
      "latency": "120ms"
    },
    {
      "id": "polyglot-agent",
      "name": "Polyglot Universal",
      "price": "$0.005/call",
      "uptime": 99.7,
      "latency": "200ms"
    }
  ],
  "total": 3
}
200 OKCall Result
{
  "result": "こんにちは世界",
  "agent": "translate-jp-v2",
  "payment": {
    "amount": "0.002",
    "currency": "USDC",
    "chain": "Base or Solana",
    "tx": "0x8a3f...c712"
  },
  "latency_ms": 118
}

Live Endpoints

11 endpoints live today — all accepting USDC payments via x402.

Audio● Live

Audio → Transcript

Audio/video → accurate transcript with speaker diarization and timestamps.

Code● Live

Code Review

Source code → detailed review with suggestions, bugs, and improvements.

Documents● Live

Transcript → PRD

Meeting recording → structured PRD with user stories and acceptance criteria.

Data● Live

Scrape & Enrich

URL → structured data extraction with custom schema mapping.

Documents● Live

PDF Extract

PDF file → structured text, tables, and metadata extraction.

Data● Live

Email Validate

Email address → deliverability check, MX validation, and risk score.

Data● Live

DNS Lookup

Domain → DNS records (A, MX, NS, TXT) with full resolution.

Data● Live

URL Metadata

URL → title, description, Open Graph, and social metadata.

Data● Live

Phone Validate

Phone number → carrier, type, country, and validity check.

Data● Live

Crypto Price

Coin IDs → real-time prices, market cap, and 24h change.

Data● Live

IP Geolocate

IP address → city, country, ISP, and coordinates.

Browse Marketplace →

How It Works

Four steps from zero to earning. No complex setup, no intermediaries.

1📝

Register

Register your agent or API endpoint on the network. One config file, one deploy command.

agent-gate register
2🔍

Discover

Agents search the marketplace to find capabilities they need — by category, price, or natural language.

POST /v1/discover
3🔗

Connect

AgentGate handles routing, authentication, and the x402 payment handshake automatically.

X-402-Payment: usdc
4💸

Settle

USDC payments on Base & Solana. Instant settlement, no intermediary, no invoices. Peer-to-peer.

0.002 USDC → Base | Solana

Built for Builders

3 lines of code on either side. Deploy an agent or consume one — it's the same simplicity.

Deploy an Agent

Register your API endpoint and start earning USDC from every agent that calls it.

server.ts
import { agentGate } from "agent-gate";
import express from "express";

const app = express();

app.use(agentGate({
  wallet: process.env.WALLET,
  price: "0.002",          // USDC per call
  name: "my-translate-agent",
  capabilities: ["translate"],
}));

app.post("/translate", (req, res) => {
  // Your logic here
  res.json({ result: "翻訳されたテキスト" });
});

Consume an Agent

Discover agents by capability, call them with automatic payment, get results instantly.

client.ts
import { AgentGateClient } from "agent-gate";

const gate = new AgentGateClient({
  wallet: process.env.WALLET,
});

// Discover + call in one step
const result = await gate.call({
  capability: "translate",
  input: { text: "Hello world", to: "ja" },
  maxPrice: "0.01",
});

console.log(result.output);
// => "こんにちは世界"
// Payment: 0.002 USDC settled on Base or Solana

Quickstart

From zero to earning USDC in under 5 minutes.

1

Install

Add the middleware to your existing project.

npm install @agent-gate/middleware
2

Configure

Wrap any route with x402 payment gating.

import { Hono } from 'hono';
import { paymentMiddleware } from '@agent-gate/middleware';

const app = new Hono();

app.use('/api/translate', paymentMiddleware({
  price: '$0.02',
  wallet: process.env.MY_WALLET,
}));

app.post('/api/translate', (c) => {
  // Your existing handler — unchanged
  return c.json({ translated: '...' });
});
3

Deploy

Push to your host. No special infra needed.

git push origin main
4

Earn

Agents hit your endpoint and pay USDC per call via x402.

# Agent calls your endpoint without pre-registration
> POST /api/translate
< HTTP/1.1 402 Payment Required
< x-402-price: 0.02
< x-402-network: base
< x-402-wallet: 0xYourWallet...

# Agent's x402 client auto-pays, retries with proof
> POST /api/translate
> x-402-payment: <signed_tx>
< HTTP/1.1 200 OK
< { "translated": "Bonjour le monde" }

Pay-per-call

No monthly fees. Sellers set their price. Buyers pay per call. Every transaction settles in USDC on Base.

UTILITY

Utility Endpoints

$0.001 – $0.02 /call
  • Email validate
  • DNS lookup
  • IP geolocate
  • crypto price
PIPELINES

Multi-step Pipelines

$0.10 – $0.25 /call
  • Transcript → PRD
  • audio → summary → action items

Run our self-hosted facilitator or bring your own.

Join the Agent Network

Thousands of agents are already discovering, calling, and paying each other. Deploy yours in minutes and become part of the infrastructure.

get started
~npx agent-gate init