⚡ x402 Payment Protocol

Built for AI Agents

AI agents can't fill out forms or sign up for accounts. Arkeo is permissionless by design — any agent can pay for blockchain data per-request with USDC via x402. No accounts. No KYC. No token exposure.

Instant access, no signup
Pay-per-request with USDC
Agent-native HTTP payments
ETH, BTC, Cosmos & more

🔄 How x402 Works

1

Agent makes a request

Your agent sends an HTTP request to an Arkeo provider endpoint — no API key or header needed.

2

Server returns 402

The provider responds with HTTP 402 Payment Required and a USDC payment address on Base.

3

Agent pays & retries

The x402 client signs a USDC micropayment and replays the request with a X-Payment header attached.

4

Data returned

Provider verifies the on-chain payment and returns the blockchain data. The whole flow takes milliseconds.

Agent Activity

Example Flow
🤖
ElizaBot Agent
eth.mainnet.getBlock → Red_5 provider
$0.0001 USDC
x402 · Base network
🤖
LangChain RPC Tool
btc.mainnet.getUTXOs → Arkeo_1 provider
$0.0001 USDC
x402 · Base network
🤖
AutoGPT Researcher
gaia.mainnet-9.cosmos → Node_42 provider
$0.0001 USDC
x402 · Base network

Why Arkeo for AI Agents?

Feature Arkeo + x402 Infura POKT Lava
No signup required ✓ None ✗ Email + KYC ✗ Account needed ✗ Account needed
Agent-native payments (x402) ✓ HTTP-native
Pay with stablecoins ✓ USDC ✓ Credit card ✗ POKT only ✗ LAVA only
Decentralized ✗ Centralized
Pay per request (no minimums) ✗ Plans required ✗ Session-based ✗ Complex staking
Cosmos / THORChain support ✓ Native Partial

🚀 Quick Start

Node.js / TypeScript

Use the official x402 fetch wrapper from Coinbase. It automatically handles 402 responses and USDC payment signing.

# Install x402-aware HTTP client npm install x402-fetch viem // agent.ts import { wrapFetchWithPayment } from 'x402-fetch'; import { privateKeyToAccount } from 'viem/accounts'; const account = privateKeyToAccount(process.env.WALLET_KEY); const fetch = wrapFetchWithPayment(globalThis.fetch, account); // Works with any Arkeo provider endpoint const res = await fetch('https://red5-arkeo.duckdns.org/', { method: 'POST', body: JSON.stringify({ jsonrpc: '2.0', method: 'eth_blockNumber', params: [], id: 1 }) }); const data = await res.json();

Python

Handle x402 manually with the requests library. Decode the payment header, sign with your wallet, and replay.

# pip install requests eth-account import requests, json, base64 from eth_account import Account ENDPOINT = "https://red5-arkeo.duckdns.org/" PAYLOAD = {"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1} r = requests.post(ENDPOINT, json=PAYLOAD) if r.status_code == 402: # Decode payment instructions from header header = r.headers.get("X-PAYMENT-REQUIRED") info = json.loads(base64.b64decode(header)) # → sign USDC transfer to info["accepts"][0]["payTo"] # → replay with X-Payment header attached print("Payment required:", info["accepts"][0]["amount"], "USDC")

🔬 See a Live x402 Response

Run this cURL against a live Arkeo provider. You'll get an HTTP 402 with USDC payment instructions — exactly what an AI agent receives.

# No API key needed — just hit the endpoint curl -sv https://red5-arkeo.duckdns.org/ \ -X POST \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' # You'll see: HTTP/1.1 402 Payment Required # X-PAYMENT-REQUIRED: eyJ4NDAyVmVyc2lvbiI6... (base64 JSON)
⚡ Full x402 Setup Guide x402.org ↗ GitHub SDK ↗

🔌 Framework Integration Examples

These examples show the pattern for integrating Arkeo x402 into popular AI frameworks. Arkeo-specific plugins are in development — contributions welcome.

Eliza Framework

Add a custom blockchain data action to your Eliza agent using the x402-fetch wrapper.

// In your Eliza plugin/action import { wrapFetchWithPayment } from 'x402-fetch'; import { privateKeyToAccount } from 'viem/accounts'; const account = privateKeyToAccount( process.env.ARKEO_WALLET_KEY ); const fetch = wrapFetchWithPayment(globalThis.fetch, account); async function getEthBlock() { const r = await fetch('https://red5-arkeo.duckdns.org/', { method: 'POST', body: JSON.stringify({ jsonrpc: '2.0', method: 'eth_blockNumber', params: [], id: 1 }) }); return r.json(); }

LangChain

Wrap an Arkeo provider as a LangChain Tool. The tool handles x402 payment automatically via the fetch wrapper.

from langchain.tools import Tool import requests def query_ethereum(method: str, params: list = []): # Add X-Payment header after 402 handshake # (use x402 Python helper when available) r = requests.post( "https://red5-arkeo.duckdns.org/", json={"jsonrpc": "2.0", "method": method, "params": params, "id": 1}, headers={"X-Payment": sign_payment()} ) return r.json() ethereum_tool = Tool( name="ethereum_rpc", func=query_ethereum, description="Query Ethereum blockchain via Arkeo" )

AutoGPT / CrewAI

Register a blockchain data command. Store your Base wallet key in the environment — the x402 handshake handles the rest.

# .env ARKEO_WALLET_KEY=0xYourPrivateKeyOnBase ARKEO_ENDPOINT=https://red5-arkeo.duckdns.org/ # commands/blockchain.py (pip install requests eth-account) import os, requests, json, base64 from eth_account import Account def eth_get_block(block="latest"): """Get Ethereum block via Arkeo — handles x402 flow""" endpoint = os.getenv("ARKEO_ENDPOINT") payload = {"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": [block, False], "id": 1} r = requests.post(endpoint, json=payload) if r.status_code == 402: # Decode payment info and sign (see Python example in /sdk/) info = json.loads(base64.b64decode( r.headers["X-PAYMENT-REQUIRED"])) # → sign USDC transfer to info["accepts"][0]["payTo"] # → retry with X-Payment header (see sdk/python/arkeo_client.py) return r.json()

Raw HTTP (Any Agent)

Any agent that can make HTTP requests can use Arkeo. No special SDK required — just handle the 402 response and sign a USDC transfer.

## The x402 flow in pseudocode: 1. POST / → HTTP 402 (payment required) X-PAYMENT-REQUIRED: <base64 JSON> 2. Decode JSON → get payTo address + amount { network: "eip155:8453", // Base asset: "0x833589...USDC", payTo: "0xd5e0f...", amount: "100" // $0.0001 USDC } 3. Sign ERC-20 transfer (EIP-712) 4. POST / again with X-Payment: <sig> 5. Receive blockchain data ✓

💰 Simple Pricing

$0.0001
per request (USDC on Base)
$0
no minimums, no monthly fees

Pricing set by individual providers. Rates shown are for Red_5 (Arkeo's reference provider). Browse all providers →

🌐 Supported Chains

Ethereum
ETH / EVM-compatible
Bitcoin
BTC mainnet
⚛️
Cosmos Hub
ATOM / IBC chains
⚗️
THORChain
RUNE / cross-chain
🌊
Osmosis
OSMO / DEX data
More Coming
Providers add chains

Ready to build?

Get your AI agent connected to blockchain data in minutes. No signup, no waiting — just a wallet and an HTTP client.