Live on ApeChain Mainnet

The Payment Rail for
Autonomous Agents

Enable AI agents to pay for API access instantly using USDC. No gas fees. Atomic settlement. Built on the open X402 standard.

Infrastructure for the Agent Economy

Designed to be invisible to the user, indispensable to the developer.

Gasless for Agents

Agents sign a permit off-chain. The facilitator handles gas fees and submission, lowering the barrier to entry for AI commerce.

Atomic Settlement

Payments are settled atomically via a smart contract. Funds move only if the permit is valid. No stuck funds, no race conditions.

1-Line Integration

Sellers add a simple middleware to their API. The facilitator handles the cryptographic verification and blockchain complexity.

How It Works

A seamless negotiation flow between Client (Agent) and Server (API), powered by standard HTTP codes.

1

Request & Challenge

Agent requests data. Server responds with 402 Payment Required and a price tag in the headers.

2

Sign Permit

Agent signs an EIP-2612 Permit for the specific amount. No gas is spent by the agent.

3

Verify & Settle

Server sends signature to Facilitator. Facilitator verifies instantly and settles on-chain.

Built for Developers,
Optimized for Agents.

Integrate monetization into your API with standard HTTP status codes. The X402 standard is designed to be language-agnostic and agent-native.

  • Compatible with standard LLM tool calling
  • Works with LangChain, AutoGPT, and custom agents
  • Instant verification via REST API
middleware.ts
import { x402 } from 'x402-middleware';

// Initialize Middleware
app.use(x402({
  wallet: "0xSellerAddress...",
  prices: {
    "/gpt-4-query": "0.05 USDC",
    "/weather-data": "0.01 USDC"
  },
  facilitator: "https://facilitator.apechain.com"}) );