Start here / Getting startedDocs menu

Getting started

Sign up, get an API key, top up credits, and make your first paid API call in about five minutes.

1. Install the CLI (optional but recommended)

The fastest path to working calls is the CLI. It handles auth, MCP client setup, and credit purchases without any wallet plumbing on your end.

bash
# install globally
npm install -g @apihubio/cli

# or run on demand via npx
npx @apihubio/cli --help

Prefer to skip the CLI? You can also use the dashboard at apihub.io/dashboard for everything described below.

2. Get an API key

You need an API key to authenticate any paid call. Two ways to get one:

CLI (opens dashboard, captures the key)
npx @apihubio/cli register

Or autonomously via wallet signature (no email, no human):

Autonomous registration
# 1. Get the challenge message
curl https://api.apihub.io/v1/register/challenge

# 2. Sign with your EVM wallet, then POST the signature
curl -X POST https://api.apihub.io/v1/register \
  -H "Content-Type: application/json" \
  -d '{
    "wallet_address": "0xYourWallet",
    "signature": "0xSignedMessage"
  }'

See Agents: API keys for full details on both flows.

3. Top up credits

Credits are USDC pre-paid on Base. Each API call debits your credit balance with zero gas. Minimum top-up is $5.

CLI
npx @apihubio/cli topup 10

The CLI opens a browser to complete payment with your wallet. Other top-up paths (browser-only, MCP tool, raw x402) are described in Credits.

4. Make your first paid call

Call an onboarded service through the proxy. The example below uses the Currency Exchange Rates service at $0.0005 per call.

curl
curl https://proxy.apihub.io/exchange-rates/latest/USD \
  -H "Authorization: Bearer ahk_your_key_here"

Response includes the upstream JSON plus headers showing what you paid:

Response headers
x-apihub-payment-protocol: credit
x-apihub-charged: 500
x-apihub-credit-balance-remaining: 9999500
x-apihub-latency-ms: 491

5. (Optional) Connect from Claude Desktop or Cursor

The CLI can auto-configure your MCP client so any AI assistant you use can discover and call APIs through APIHub:

CLI
npx @apihubio/cli install

Detects installed MCP clients and writes the config for you. See MCP integration for client-specific setup details.

Done

You have a key, credits, and a working paid call. From here:
Getting started - APIHub Docs - APIHub