# APIHub.io > The marketplace for AI agent APIs. Discover, pay for, and consume APIs with a single integration. ## What is APIHub? APIHub is a marketplace where AI agents discover and pay for APIs using x402 (USDC on Base) for per-request on-chain payments. Agents connect via MCP (Model Context Protocol) or REST API. No pre-funding, no credit cards, no human approval required. ## Autonomous Registration Agents can self-register without human intervention: 1. GET /v1/register/challenge - get the message to sign 2. Sign the message with your EVM wallet (personal_sign) 3. POST /v1/register with wallet_address and signature 4. Receive an API key immediately No email or human approval required. The wallet IS your identity. ## Command-Line Interface The fastest way to use APIHub from a terminal or AI coding tool: ``` npm install -g @apihubio/cli # or run on-demand npx @apihubio/cli ``` Commands: - apihub register - Sign up and save API key - apihub balance - Show credit balance - apihub topup - Buy credits (minimum $5) - apihub search [query] - Search the marketplace - apihub call - Make a paid call through APIHub's proxy - apihub add - Save an x402 service to your toolset - apihub install - Wire up MCP config for Claude/Cursor/Codex/Claude Code npm: https://www.npmjs.com/package/@apihubio/cli ## API Endpoints Base URL: https://api.apihub.io Registration (no auth): - GET /v1/register/challenge - get wallet signature challenge - POST /v1/register - register with wallet signature, receive API key Public (no auth): - GET /v1/services - List all active native services (paginated) - GET /v1/services/:slug - Get service details with endpoints - GET /v1/external - List external x402 marketplace services - GET /v1/external/:id - Get external listing with all endpoints Authenticated (Bearer token): - POST /v1/search - Search APIs by capability, category, or price - GET /v1/wallet/balance - Check credit balance, spending history, and rate limits - POST /v1/credits/purchase - Purchase credits via x402 payment - GET /v1/credits/balance - Check credit balance - GET /v1/credits/history - Credit transaction history MCP (Bearer token): - POST /mcp - MCP JSON-RPC endpoint (initialize, tools/list, tools/call) Proxy (Bearer token): - ANY /:service/:endpoint - Call native APIHub services - POST /external { url, method, body, headers } - Call any external x402 API; APIHub pays provider from platform wallet, debits your credit balance for exact amount ## Authentication All endpoints (except registration, /v1/external, and health) require a Bearer token: Authorization: Bearer ahk_your_api_key ## MCP Server URL: https://mcp.apihub.io/mcp Tools: - apihub_search - Find native APIs by capability, category, or price - apihub_list_services - Browse all available native services - apihub_get_service - Get full service details including schemas - apihub_call - Make a paid API call to a native service - apihub_search_external - Search external x402 marketplace services - apihub_call_external - Call any external x402 URL via APIHub's proxy (credits pay provider, no wallet needed) - apihub_read_content - Read web content through a paid content gateway - apihub_topup - Purchase credits via x402 (USDC on Base). Returns payment instructions for browser, CLI, or direct x402 - apihub_balance - Check credit balance, spending, and rate limits ## Content Gateway APIHub also supports content gateway services. Content creators register their domains and set per-page pricing. Agents access content via: - GET /{service_slug}/fetch?url={target_url} The proxy extracts clean structured content (title, text, headings) via headless browser rendering. Content services appear alongside API services in search and marketplace results. ## External APIs The marketplace also includes external x402-compatible APIs discovered from public on-chain records. These are not operated by APIHub. Two ways to call external APIs: 1. Via APIHub (recommended): POST https://proxy.apihub.io/external or use apihub_call_external MCP tool. APIHub pays the provider on your behalf using the platform wallet; your credit balance is debited for the exact paid amount. No wallet or gas required. 2. Via direct x402: call the URL yourself with @x402/fetch and your own EVM wallet. External APIs: - Are monitored for uptime by APIHub - Are marked with an "external" badge in the marketplace - Link to a detail page with endpoint, pricing, schemas, and code examples ## Payments For APIHub-native APIs, payment priority: free tier > prepaid credits > per-request x402 > 402 challenge. For external APIs: x402 direct payment only. 1. Prepaid credits (native APIs only): Purchase credits via POST /v1/credits/purchase (single USDC transaction on Base). Each API call debits from your credit balance with no gas cost. 2. Per-request x402: USDC on Base via @x402/fetch client. Works for both native and external APIs. ## Rate Limits - Free tier: 100 requests per minute per API key - Paid tier (credit balance > 0): 1,000 requests per minute per API key - Custom: contact us for higher limits ## Pricing Providers set per-request prices in microdollars (1 USD = 1,000,000 microdollars). Platform commission: 10% default, configurable per provider and per service. ## Links - Website: https://apihub.io - Full API Documentation: https://apihub.io/llms-full.txt - API: https://api.apihub.io - MCP: https://mcp.apihub.io/mcp - Proxy: https://proxy.apihub.io - Marketplace: https://apihub.io/marketplace - Docs: https://apihub.io/docs - Getting Started: https://apihub.io/docs/getting-started - Agent Card: https://apihub.io/.well-known/agent.json - Agent Skills: https://apihub.io/.well-known/agent-skills/index.json - Agent Signup (human): https://apihub.io/agents/login ## Skills (step-by-step guides) - Register: https://apihub.io/skills/register.md - Purchase Credits: https://apihub.io/skills/purchase-credits.md - Make an API Call: https://apihub.io/skills/make-api-call.md - Handle 402 Responses: https://apihub.io/skills/handle-402.md - Use MCP: https://apihub.io/skills/use-mcp.md - Manage Balance: https://apihub.io/skills/manage-balance.md