x402 protocol · USDC · Base Mainnet

TOOLS FOR AI AGENTS

32 APIs. One endpoint. Pay per call.
No subscriptions, no API keys, no signups.
Your agent pays and gets data back — instantly, on-chain.

Start building → Browse APIs View reference
32+
Live APIs
$0.01
Starting price (USDC)
Base
L2 Network
0
Subscriptions needed
USDC
Payment token
How it works

HTTP 402 → sign → data.

The x402 protocol adds a native micropayment layer to HTTP. No wallet popups — payment happens at the SDK level, invisible to the end user.

01 ——
📡

Agent sends request

POST to /v1/call with { api, inputs }. No API key needed in the header.

02 ——

Gateway returns 402

Server responds with HTTP 402 and a payment payload: amount, recipient address, network, token.

03 ——
🔐

Client signs & pays

The x402 SDK signs the payment with your wallet and submits the USDC transfer on Base — typically under 2 seconds.

04 ——

Response delivered

Payment verified on-chain. Gateway calls the upstream provider and returns normalized JSON. Done.

⚙️ x402 Protocol Details

Extends standard HTTP with a 402 Payment Required negotiation cycle. Works with any HTTP client that supports the x402 spec.

  • Network: Base Mainnet (chain 8453)
  • Token: USDC native on Base
  • Scheme: exact — pay precisely what's requested
  • Facilitator: Coinbase CDP verifier
  • Payment timeout: 30 seconds
  • Failed payments: not charged, request discarded

🤖 Built for autonomous agents

No rate limits tied to accounts. No OAuth flows. Agents pay for exactly what they consume — nothing else.

  • Zero subscription overhead
  • Compatible with any x402 HTTP client
  • Preview cost: POST /v1/estimate (free)
  • Discover APIs: GET /v1/apis (free)
  • Inspect schema: GET /v1/schema/:api (free)
  • Payment is atomic — if upstream fails, no charge
  • All responses normalized to consistent JSON

💡 What you need to start

Two things: a funded wallet on Base and an x402-compatible HTTP client. That's it.

  • Wallet with USDC on Base Mainnet
  • x402 SDK: npm i @x402/fetch / pip install x402
  • No registration, no email, no account
  • Min recommended balance: $1 USDC (100 calls)
  • Bridge USDC to Base: bridge.base.org

📦 Response format

All successful responses follow a consistent envelope regardless of the API called.

  • success: true/false
  • api — name of the API called
  • charged_usdc — exact amount charged
  • data — normalized payload (varies per API)
  • error — present only on failure
  • upstream — provider used (informational)
Prepaid Balance

Load once. Call without gas.

Top up a prepaid balance with USDC via x402 — then make hundreds of API calls using a simple Bearer token. No wallet signing per request, no gas fees, instant responses.

⚡ How it works

  • Pay once via x402 → receive a sk_... Bearer token
  • Use the token in every call: Authorization: Bearer sk_...
  • Balance deducted atomically per call (Lua script, race-condition safe)
  • Upstream failure → automatic refund, never charged for errors
  • Token never expires — recover it anytime with your wallet signature

💳 Top up

Valid amounts: $1, $2, $5, $10, $20, $50 USDC. Pay via x402 on Base Mainnet.

  • POST /v1/topup — protected by x402
  • Body: { "amount_usd": 1 }
  • Returns: token, wallet, balance_usd
  • Re-topup: include "token": "sk_..." to recharge existing token
  • $1 ≈ 100 basic calls (crypto, weather) or 16 hotel searches

🔑 Token management

  • GET /v1/user/balance — check current balance
  • GET /v1/user/transactions — full call history
  • GET /v1/user/recover/challenge — get recovery challenge
  • POST /v1/user/recover — recover token with wallet signature
  • Replay attacks blocked — challenge is single-use with 5 min TTL

🤖 MCP tools

From Claude Desktop or Claude Code — no terminal needed.

  • topup_balance — load $1–$50 USDC, get token
  • get_balance — check available balance
  • recover_token — recover lost token via wallet signature
  • Session auto-switches to balance mode after topup
  • Falls back to x402 pay-per-call if balance runs out
Works with any MCP-compatible client

Use it directly from Claude.

Install the rwagenthub-mcp package and Claude gets access to all 32 APIs as native tools — no code, no HTTP calls, just conversation.

01

Get a Base wallet

Create a dedicated wallet with a few USDC on Base Mainnet. Coinbase Wallet →

02

Add to your config

Edit claude_desktop_config.json — no install needed, npx handles it.

{ "mcpServers": { "agenthub": { "command": "npx", "args": ["-y", "rwagenthub-mcp@latest"], "env": { "MCP_WALLET_PRIVATE_KEY": "0x...", "MCP_BALANCE_TOKEN": "sk_..." // optional — prepaid balance token } } } }
Mac ~/Library/Application Support/Claude/claude_desktop_config.json
Win %APPDATA%\Claude\claude_desktop_config.json
03

Restart Claude Desktop

On first launch, npx downloads the package automatically. You'll see 35 tools in the tools menu — including topup_balance, get_balance and recover_token.

04

Load prepaid balance (optional)

Skip per-call gas fees. Just say: topup_balance with amount_usd: 1 — Claude signs the payment and stores your token automatically. Check your balance anytime with get_balance.

View on npm →
Claude Desktop
JS SDK — for Node / TypeScript apps

Call any API in 3 lines.

rwagenthub-sdk is a JS wrapper that handles wallet setup, x402 payments and error handling for you. Install it, pass your private key, call any of the 32 APIs — done.

1 — Install
npm install rwagenthub-sdk
2 — Use
import { AgentHub } from "rwagenthub-sdk"

const hub = new AgentHub({ privateKey: process.env.WALLET_PRIVATE_KEY })

// Call any API — payment happens automatically
const quote = await hub.call("stock_quote", { symbol: "NVDA" })
console.log(quote.price)        // 134.20
console.log(quote.change_pct)   // 1.8

const weather = await hub.call("weather_forecast", { location: "Tokyo" })
const flights = await hub.call("flight_search", { from: "JFK", to: "LAX", date: "2026-06-01" })
💳
Payments are invisible

No manual signing. No 402 handling. The SDK detects the payment request and pays with your wallet automatically before returning the result.

🎯
Returns data directly

hub.call() returns the data field — no envelope to unwrap. On any error it throws with a clear message.

🆓
Free utility methods

hub.estimate(api) returns the price before you pay. hub.listApis() and hub.schema(api) never charge anything.

🔌
When to use the SDK vs MCP

Use the SDK when you're building a Node/TS app and want to call APIs in code. Use MCP when you want Claude to call them for you via chat — no code needed.

View on npm → More examples
OpenClaw Skill — for AI personal assistants

Use AgentHub from Telegram, WhatsApp, or any chat.

Install the rwagenthub skill on ClawHub and your OpenClaw agent gets access to all 32 APIs via natural language — on any messaging platform.

1 — Install the skill & SDK
clawhub install rwagenthub
npm install -g rwagenthub-sdk
2 — Set your wallet key
openclaw config set env.MCP_WALLET_PRIVATE_KEY "0xYOUR_PRIVATE_KEY"

# Add USDC on Base Mainnet to that wallet
# Min recommended: $1 (covers 100+ calls)
3 — Ask naturally
→ "Search flights from EZE to JFK for April 20"
→ "What's the price of Bitcoin right now?"
→ "Find hotels in Rome for next weekend"
→ "Run this Python script: print(1+1)"
🦞
Works on any OpenClaw channel

Telegram, WhatsApp, Discord, SMS — wherever your OpenClaw agent runs, the skill is available. No extra setup per channel.

💬
Natural language, no commands

OpenClaw matches your message to the right API automatically. Just describe what you need — the skill handles routing, payment, and response formatting.

🔒
Your key never leaves your device

The SDK signs payments locally using EIP-3009 — only the signed authorization is sent to the network. Your private key is never transmitted.

💳
When to use Skill vs MCP vs SDK

Use Skill when you chat with an AI assistant (Telegram/WhatsApp). Use MCP for Claude Desktop/Code. Use SDK when building a Node.js app.

View on ClawHub → OpenClaw docs
Quickstart

One endpoint. Any language.

The x402 client handles payment automatically — your code just sees a regular HTTP response.

# List all available APIs — no payment needed
curl https://agents-production-73c1.up.railway.app/v1/apis

# Response:
{
  "apis": [
    { "name": "flight_search",    "price_usd": 0.01 },
    { "name": "hotel_search",     "price_usd": 0.06 },
    { "name": "web_search",       "price_usd": 0.02 },
    { "name": "crypto_price",    "price_usd": 0.01 },
    { "name": "code_exec",        "price_usd": 0.05 }
    // ... 28 more
  ]
}

# Inspect schema for any API
curl https://agents-production-73c1.up.railway.app/v1/schema/hotel_search

# Response:
{
  "name": "hotel_search",
  "price_usd": 0.06,
  "inputs": {
    "city_code":  { "type": "string", "required": true  },
    "check_in":   { "type": "string", "required": false },
    "check_out":  { "type": "string", "required": false }
  }
}
# Check price before calling — no payment needed
curl -X POST https://agents-production-73c1.up.railway.app/v1/estimate \
  -H "Content-Type: application/json" \
  -d '{"api":"flight_search"}'

# Response:
{
  "success": true,
  "api": "flight_search",
  "price_usd": 0.01
}
# npm install rwagenthub-sdk
import { AgentHub } from "rwagenthub-sdk"

const hub = new AgentHub({ privateKey: process.env.WALLET_PRIVATE_KEY })

// Call any API — payment handled automatically
const flights = await hub.call("flight_search", {
  from: "JFK", to: "LAX", date: "2026-04-15"
})
console.log(flights.flights)

// Check price before calling (free)
const { price_usd } = await hub.estimate("flight_search")

// List all 32 APIs with prices (free)
const { apis } = await hub.listApis()

// Get JSON Schema for any API (free)
const schema = await hub.schema("weather_forecast")
import { createWalletClient, http } from "viem"
import { privateKeyToAccount } from "viem/accounts"
import { base } from "viem/chains"
import { withPaymentInterceptor } from "@x402/fetch"

const account = privateKeyToAccount(process.env.PRIVATE_KEY)
const wallet = createWalletClient({ account, chain: base, transport: http() })
const pay = withPaymentInterceptor(fetch, wallet)

const res = await pay("https://agents-production-73c1.up.railway.app/v1/call", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    api: "flight_search",
    inputs: { from: "JFK", to: "LAX", date: "2026-04-15" }
  })
})
const { data } = await res.json()
console.log(data.flights)
# pip install x402 eth-account
from x402 import x402_requests
from eth_account import Account
import os

account = Account.from_key(os.environ["PRIVATE_KEY"])
session = x402_requests.Session(account)

response = session.post(
    "https://agents-production-73c1.up.railway.app/v1/call",
    json={ "api": "web_search", "inputs": { "query": "latest AI news" } }
)
for r in response.json()["data"]["results"]:
    print(r["title"], r["url"])
// Success
{ "success": true, "data": { /* API result */ } }

// Unknown API (400)
{ "success": false, "error": "unknown_api", "api": "bad_name" }

// Upstream error (500)
{ "success": false, "error": "internal_error" }
const gatewayTool = {
  name: "gateway_call",
  description: "Call any tool from the AgentHub gateway. Available: flight_search, hotel_search, web_search, weather_forecast, crypto_price, stock_quote, geocode, ip_reputation, alchemy_portfolio, url_scrape, email_send, code_exec, and 22 more.",
  parameters: {
    type: "object",
    properties: {
      api: { type: "string", description: "API name from /v1/apis" },
      inputs: { type: "object", description: "API-specific inputs" }
    },
    required: ["api", "inputs"]
  },
  execute: async ({ api, inputs }) => {
    const res = await pay("https://agents-production-73c1.up.railway.app/v1/call", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({ api, inputs })
    })
    return res.json()
  }
}
// The agent pays for each call automatically — no manual auth required
Available APIs

32 adapters. One endpoint.

All APIs called via POST /v1/call with body { "api": "<name>", "inputs": { ... } }. Required params marked in purple.

flight_search
travel $0.01

Search one-way flights. Returns top 10 itineraries with airline, price, stops, duration and baggage conditions.

from* to* date* adults cabin_class
{ "api": "flight_search", "inputs": { "from": "MAD", "to": "JFK", "date": "2026-06-01" } }
{ "flights": [{ "offer_id": "off_00123abc", "airline": "Iberia", "price": 420.50, "currency": "USD", "stops": 0, "duration": "8h 30m", "cabin_class": "economy" }] }
flight_status
travel $0.01

Real-time status for a specific flight. Returns actual vs scheduled times, delay in minutes, gate and terminal.

carrier_code* flight_number* date*
{ "api": "flight_status", "inputs": { "carrier_code": "IB", "flight_number": "6251", "date": "2026-06-01" } }
{ "status": [{ "flight": "IB6251", "status": "active", "delay_minutes": 12, "departure": { "scheduled": "10:00", "actual": "10:12", "gate": "B22" } }] }
seat_map
travel $0.01

Full seat map for a flight offer. Use the offer_id returned by flight_search. Returns cabin layout and seat availability.

offer_id*
{ "api": "seat_map", "inputs": { "offer_id": "off_00123abc" } }
{ "seat_maps": [{ "cabin_class": "economy", "rows": [{ "row": 10, "seats": [ { "id": "10A", "available": true, "type": "window" }, { "id": "10B", "available": false, "type": "middle" } ] }] }] }
airport_search
travel $0.01

Search airports by name, city or IATA code. Returns IATA, city, country and timezone. Ideal for input validation and autocomplete in agent flows.

query*
{ "api": "airport_search", "inputs": { "query": "New York" } }
{ "airports": [{ "iata_code": "JFK", "name": "John F. Kennedy Intl", "city": "New York", "country": "US", "timezone": "America/New_York" }] }
hotel_search
travel $0.06

Hotels by city and dates. Returns available properties with name, room type, nightly rate and cancellation policy.

city_code* check_in check_out adults rooms ratings
{ "api": "hotel_search", "inputs": { "city_code": "NYC", "check_in": "2026-06-01", "check_out": "2026-06-03" } }
{ "hotels": [{ "name": "The Plaza", "rating": 5, "price_per_night": 520.00, "currency": "USD", "room_type": "Deluxe King", "cancellation": "FREE until May 29" }] }
activities_search
travel $0.01

Tours, experiences and activities by GPS coordinates. Returns bookable experiences with pricing, duration and ratings.

latitude* longitude* radius
{ "api": "activities_search", "inputs": { "latitude": 48.8566, "longitude": 2.3522 } }
{ "activities": [{ "name": "Eiffel Tower Priority Access", "price": 35.00, "currency": "EUR", "duration": "2h", "rating": 4.8 }] }
opensky_flights
travel $0.01

Live flight tracking via OpenSky Network. Returns active flights in a bounding box with callsign, origin country, altitude, speed and heading.

lamin* lomin* lamax* lomax*
{ "api": "opensky_flights", "inputs": { "lamin": 40.0, "lomin": -75.0, "lamax": 42.0, "lomax": -72.0 } }
{ "count": 3, "flights": [{ "callsign": "UAL789", "origin_country": "United States", "altitude_m": 10972, "velocity_ms": 241.5, "heading": 87.2, "latitude": 41.23, "longitude": -73.85 }] }
web_search
search $0.02

Google web or news search. Returns organic results with title, URL, snippet and publication date.

query* type num location
{ "api": "web_search", "inputs": { "query": "best hotels Tokyo 2026", "num": 3 } }
{ "results": [{ "title": "Best Hotels in Tokyo 2026", "url": "https://travel.example.com/tokyo", "snippet": "Discover top-rated hotels in Shinjuku...", "date": "2026-01-15" }] }
web_search_ai
search $0.02

Semantic search optimized for LLMs. Returns clean summaries from source pages inline — no extra scraping step. Ideal for RAG pipelines.

query* count summary freshness
{ "api": "web_search_ai", "inputs": { "query": "best hotels Tokyo 2026", "count": 3, "summary": true } }
{ "results": [{ "title": "Park Hyatt Tokyo Review", "url": "https://...", "summary": "Floors 39-52, Shinjuku Tower. From ¥65,000/night.", "score": 0.94 }] }
places_search
search $0.02

Local businesses and points of interest. Returns name, address, rating, phone, hours and lat/lng coordinates.

query* location num
{ "api": "places_search", "inputs": { "query": "restaurants near Eiffel Tower" } }
{ "places": [{ "name": "Le Jules Verne", "address": "Champ de Mars, Paris", "rating": 4.6, "phone": "+33 1 45 55 61 44", "latitude": 48.8582, "longitude": 2.2945 }] }
image_search
search $0.01

Google image search. Returns image URLs, thumbnails, source domain and dimensions. Supports safe search.

query* num safe
{ "api": "image_search", "inputs": { "query": "Patagonia landscape", "num": 3 } }
{ "images": [{ "url": "https://cdn.natgeo.com/patagonia.jpg", "thumbnail": "https://cdn.natgeo.com/thumb.jpg", "source": "nationalgeographic.com", "width": 1920, "height": 1080 }] }
shopping_search
search $0.02

Google Shopping results. Returns product listings with price, store name, rating, reviews count and direct purchase link.

query* num country
{ "api": "shopping_search", "inputs": { "query": "carry-on luggage 40L", "num": 3 } }
{ "products": [{ "title": "Osprey Farpoint 40L", "price": 160.00, "currency": "USD", "store": "REI", "rating": 4.8, "reviews": 2341 }] }
url_extract
search $0.02

Fetches any public URL and returns clean Markdown text ready for LLM consumption. Strips ads, nav and boilerplate. Essential for RAG pipelines.

url* format
{ "api": "url_extract", "inputs": { "url": "https://en.wikipedia.org/wiki/Patagonia" } }
{ "url": "https://en.wikipedia.org/wiki/Patagonia", "title": "Patagonia - Wikipedia", "content": "# Patagonia\nPatagonia is a geographical region...", "tokens": 4821 }
url_scrape
search $0.01

Deep web scraping via Firecrawl. Returns clean Markdown from JS-rendered pages including SPAs and dynamic content. More thorough than url_extract.

url* formats only_main_content
{ "api": "url_scrape", "inputs": { "url": "https://example.com/article" } }
{ "url": "https://example.com/article", "title": "Example Article", "markdown": "# Example Article\nFull article content...", "metadata": { "description": "..." } }
url_scrape_json
search $0.02

Extract structured JSON from any URL using a schema prompt. Define what fields you want and get back clean structured data. Powered by Firecrawl.

url* prompt* schema
{ "api": "url_scrape_json", "inputs": { "url": "https://example.com/product", "prompt": "Extract product name, price and rating" } }
{ "url": "https://example.com/product", "data": { "name": "Wireless Headphones Pro", "price": "$149.99", "rating": 4.7 } }
web_search_full
search $0.02

Deep web research: searches the web and scrapes full page content from top results. Returns search results with complete article text. Best for research tasks.

query* num_results scrape_options
{ "api": "web_search_full", "inputs": { "query": "x402 protocol micropayments 2026", "num_results": 3 } }
{ "query": "x402 protocol micropayments 2026", "results": [{ "url": "https://x402.org", "title": "x402 Protocol", "markdown": "# x402 Protocol\nThe x402 protocol enables..." }] }
crypto_price
data $0.01

Real-time crypto prices. Supports BTC, ETH, SOL and 20+ symbols. Returns price, 24h change %, market cap and volume.

coins* vs_currency
{ "api": "crypto_price", "inputs": { "coins": "btc,eth,sol", "vs_currency": "usd" } }
{ "prices": { "btc": { "usd": 94200.50, "usd_24h_change": 2.31 }, "eth": { "usd": 3410.20, "usd_24h_change": -0.87 } } }
weather_forecast
data $0.01

Current conditions + 15-day daily forecast via Visual Crossing. Returns temperature, precipitation, wind, sunrise/sunset and condition description.

location or lat+lon* days units
{ "api": "weather_forecast", "inputs": { "location": "Buenos Aires", "days": 3 } }
{ "location": "Buenos Aires, Argentina", "timezone": "America/Argentina/Buenos_Aires", "current": { "temperature": "28.4°C", "feels_like": "30.1°C", "humidity": "72%", "wind_speed": "14 km/h", "condition": "Partly cloudy" }, "forecast": [{ "date": "2026-02-24", "temp_max": "30.1°C", "temp_min": "22.5°C", "precipitation": "0 mm", "sunrise": "06:28:12", "sunset": "19:51:04" }] }
exchange_rate
data $0.01

Real-time and historical forex rates for 160+ currencies via ECB data. Convert any amount between currency pairs.

to* from amount date
{ "api": "exchange_rate", "inputs": { "from": "USD", "to": "EUR,GBP,JPY", "amount": 100 } }
{ "base": "USD", "amount": 100, "date": "2026-02-23", "rates": { "EUR": 92.41, "GBP": 78.95, "JPY": 14832.00 } }
defi_market_snapshot
data $0.02

Full DeFi market overview in one call: total TVL, top protocols, top chains by TVL, DEX volume 24h and protocol fees 24h. Powered by DeFiLlama.

top chain
{ "api": "defi_market_snapshot", "inputs": { "top": 5 } }
{ "total_tvl_usd": 91400000000, "dex_volume_24h_usd": 8230000000, "fees_24h_usd": 52900000, "top_protocols": [{ "name": "Aave V3", "category": "Lending", "tvl_usd": 25420000000, "change_1d_pct": 0.8 }], "top_chains": [{ "name": "Ethereum", "tvl_usd": 52190000000 }] }
defi_yields
data $0.02

Best yield farming pools from DeFiLlama. Filter by stablecoin-only, no IL risk, chain, minimum TVL and minimum APY. Returns APY, base vs reward breakdown and pool ID.

stablecoin_only no_il_risk chain min_tvl_usd min_apy top
{ "api": "defi_yields", "inputs": { "stablecoin_only": true, "no_il_risk": true, "min_tvl_usd": 1000000, "top": 5 } }
{ "count": 5, "pools": [{ "project": "aave-v3", "symbol": "USDC", "chain": "Ethereum", "apy": 4.82, "tvl_usd": 1840000000, "stablecoin": true, "il_risk": "no" }] }
geocode
data $0.01

Forward and reverse geocoding via Nominatim/OpenStreetMap. Convert addresses to coordinates and vice versa. Returns lat/lng, bounding box, city, country and place type.

q lat lon limit
{ "api": "geocode", "inputs": { "q": "Eiffel Tower, Paris" } }
{ "results": [{ "display_name": "Eiffel Tower, Paris, France", "lat": 48.8584, "lon": 2.2945, "type": "attraction", "country": "France", "city": "Paris" }] }
ip_reputation
data $0.01

IP address threat intelligence. Returns abuse confidence score, ISP, country, usage type and report count. Useful for fraud detection and bot filtering.

ip* max_age_days
{ "api": "ip_reputation", "inputs": { "ip": "1.1.1.1" } }
{ "ip": "1.1.1.1", "abuse_confidence_score": 0, "isp": "Cloudflare", "country_code": "AU", "usage_type": "Content Delivery Network", "total_reports": 0, "is_tor": false }
alchemy_portfolio
data $0.02

On-chain token balances for any wallet address. Returns ERC-20 and native token holdings with balance, decimals and contract address. Supports Ethereum and Base.

address* network
{ "api": "alchemy_portfolio", "inputs": { "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "network": "eth-mainnet" } }
{ "address": "0xd8dA6BF2...", "network": "eth-mainnet", "token_count": 12, "tokens": [{ "symbol": "ETH", "balance": "4.218", "decimals": 18 }] }
alchemy_tx_history
data $0.02

On-chain transaction history for any wallet. Returns sent/received transfers with asset, value, counterparty and block timestamp. Supports ETH, ERC-20 and ERC-721.

address* network category limit
{ "api": "alchemy_tx_history", "inputs": { "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "network": "eth-mainnet", "limit": 5 } }
{ "address": "0xd8dA6BF2...", "count": 5, "transfers": [{ "asset": "ETH", "value": 0.5, "from": "0xd8dA...", "to": "0xAbC1...", "block_timestamp": "2026-02-15T10:23:44Z" }] }
stock_quote
finance $0.01

Real-time stock quote via Finnhub. Returns price, change, % change, high/low, open and previous close.

symbol*
{ "api": "stock_quote", "inputs": { "symbol": "AAPL" } }
{ "symbol": "AAPL", "price": 266.44, "change": -6.51, "change_pct": -2.39, "high": 272.81, "low": 266.36, "open": 272.26, "prev_close": 272.95, "timestamp": "2026-02-27T18:19:39.000Z" }
stock_profile
finance $0.01

Company profile from Finnhub. Returns name, exchange, industry, country, market cap, IPO date, website and logo.

symbol*
{ "api": "stock_profile", "inputs": { "symbol": "MSFT" } }
{ "symbol": "MSFT", "name": "Microsoft Corp", "exchange": "NASDAQ NMS - GLOBAL MARKET", "industry": "Technology", "country": "US", "market_cap": 2983023.69, "ipo": "1986-03-13", "website": "https://www.microsoft.com/" }
stock_search
finance $0.01

Search for stock symbols by company name or ticker. Returns symbol, name, type and exchange. Useful for lookup before quoting.

query*
{ "api": "stock_search", "inputs": { "query": "nvidia" } }
{ "query": "nvidia", "count": 1, "results": [{ "symbol": "NVDA", "name": "NVIDIA Corp", "type": "Common Stock", "exchange": "NVDA" }] }
market_news
finance $0.01

Latest financial news via Finnhub. Query by company symbol or by category: general, forex, crypto, merger. Returns headline, summary, source and URL.

symbol category limit
{ "api": "market_news", "inputs": { "symbol": "TSLA", "limit": 3 } }
{ "symbol": "TSLA", "category": "company", "count": 3, "results": [{ "headline": "Tesla sales drop 40% in Europe", "source": "Reuters", "url": "https://reuters.com/...", "datetime": "2026-02-27T15:30:00.000Z" }] }
earnings_calendar
finance $0.01

Upcoming and past earnings announcements. Filter by symbol or date range. Returns EPS estimate/actual, revenue estimate/actual and report time.

symbol from to
{ "api": "earnings_calendar", "inputs": { "from": "2026-03-01", "to": "2026-03-07" } }
{ "from": "2026-03-01", "to": "2026-03-07", "count": 519, "earnings": [{ "symbol": "AAPL", "date": "2026-03-04", "hour": "amc", "eps_estimate": 2.34, "eps_actual": null, "quarter": 1, "year": 2026 }] }
email_send
action $0.01

Send transactional email. Supports HTML and plain text body. Returns Resend message ID on success. Requires verified sender domain.

to* subject* html or text* from cc bcc reply_to
{ "api": "email_send", "inputs": { "to": "user@example.com", "subject": "Your booking is confirmed", "html": "<p>Flight IB6251 confirmed.</p>" } }
{ "id": "re_9xKp2mNv_7fQaB3cLwRdE8yT" }
code_exec
action $0.05

Execute code in an isolated cloud sandbox. Returns stdout, stderr and last expression result. Supports Python, JavaScript, R and Bash. Max 120s timeout.

code* language timeout
{ "api": "code_exec", "inputs": { "code": "print(2 ** 10)", "language": "python", "timeout": 15 } }
{ "stdout": ["1024"], "stderr": [], "result": "1024", "error": null }
Endpoint reference

REST API

Base URL: https://agents-production-73c1.up.railway.app

Method Path Auth Description
GET /health none Health check. Returns { status: "ok", timestamp, version }
GET /v1/apis none List all available APIs with parameters and prices. Free to call.
GET /v1/schema none Full input schema for every API — types, required fields, defaults, examples. Free.
GET /v1/schema/:api none Schema for a single API. Returns inputs, description, example and price_usd. Free.
POST /v1/estimate none Return cost for a call without executing it. Body: { "api": "flight_search" }. Free.
POST /v1/call ⚡ x402 Execute any API call. Body: { "api": "<name>", "inputs": { ... } }. Requires USDC via x402.
⚠️
Payment is atomic. The gateway calls the upstream provider after verifying payment on-chain. If the upstream call fails after payment settles, the charge still applies — the x402 protocol has no native refund mechanism. Build retry logic client-side for critical workflows.
Error handling

HTTP status codes.

All error responses include { success: false, error: "message" }. Handle these in your agent loop.

200
OK
Call succeeded. Payment charged. Data in data field.
402
Payment Required
Normal x402 flow. Response contains payment payload. x402 SDK handles this automatically.
400
Bad Request
Missing or invalid inputs. Check required params. No payment charged.
402 (invalid)
Payment Failed
Payment signature invalid or funds insufficient. No charge. Retry with valid wallet/balance.
503
Upstream Error
Upstream provider returned an error. Payment may have been charged. Check error.upstream.
429
Rate Limited
Too many requests from this wallet in a short window. Back off exponentially. No charge.