# APIbase — Universal API Hub for AI Agents
# https://apibase.pro

> 618 API tools from 191 providers via one MCP endpoint.
> Supports x402 (USDC on Base) and MPP payments.

## Quick Start for Agents
- Connect: POST https://apibase.pro/mcp (MCP Streamable HTTP)
- Discover tools: Call prompt "discover_tools" with task or category
- Full catalog: GET https://apibase.pro/api/v1/tools (all 618 tools, JSON schemas)
- OpenAPI spec: GET https://apibase.pro/.well-known/openapi.json

## Progressive Disclosure
618 tools across 21 categories. Use discover_tools prompt to find relevant tools:
- No args → category index (21 categories with counts)
- category="finance" → 27 finance tools
- task="search flights" → amadeus, aviasales, sabre tools ranked by relevance
All tools remain callable via tools/call regardless of discovery.

## Categories (21)
travel, weather, finance, crypto, search, news, location, health,
entertainment, education, jobs, space, social, legal, business,
developer, media, infrastructure, messaging, marketing, world

## Payment
- Protocol: x402 (HTTP 402 Payment Required) or MPP (Authorization: Payment)
- Token: USDC on Base mainnet (x402) or Tempo (MPP)
- Prices: $0.001–$29.99 per call (most tools $0.001–$0.005)
- Details: https://apibase.pro/.well-known/x402-payment.json
- IMPORTANT: use ONE protocol per request, not both
- If using mppx SDK: set polyfill: false to avoid intercepting x402 requests

## Agent Integration Guide
1. Match price to wallet — fetch only tools you can afford:
     GET /api/v1/tools?max_price=0.01     # only tools ≤ $0.01
     GET /api/v1/tools?tier=micro         # < $0.01
     GET /api/v1/tools?tier=standard      # $0.01–$0.99
     GET /api/v1/tools?tier=premium       # $1+ (only 3 tools: domain reg, ad spend)
2. Each tool entry includes:
     pricing.price_usd       — sticker price per call
     pricing.cache_hit_price_usd — discounted balance-tier rate (10% of price)
     tier                    — micro | standard | premium
     min_balance_usd         — minimum on-chain USDC the wallet should hold
     input_schema            — JSON Schema for the call's body
3. 402 challenge body always includes price_usd + min_balance_usd, so you can
   short-circuit signing if your balance is insufficient.
4. Use input_schema to build valid params — avoids 400 schema validation errors.
5. Cache the tool list — it changes only on provider onboards (rare).
