Docs

apifare docs

A prepaid balance and key vault your agent spends through: no separate provider account or provider API key for eligible capabilities. One apifare account gives your agent a capped, auditable budget.

Get started

  1. Get a key. Sign up at /start: email in, token out (shown once). New accounts start with 500 free credits; 1 credit = $0.01. Save the token somewhere safe.
  2. Connect your agent. In Claude Code:
    claude mcp add apifare -e APIPAY_TOKEN=<your-token> -- npx -y apifare-mcp
    Every other client has a step-by-step guide: integration guides.
  3. Ask. Try search the web for X, then fetch a URL, then what's the weather in London. Each call is debited from your balance at its listed price.

Let your agent set itself up

Give your agent this one line and it takes it from there:

read https://apifare.com/llms.txt and get yourself a key

It signs up with your email, saves the token, and discovers what it can call. llms.txt is these docs, written for agents.

How it works

Balance and credits

Your balance is prepaid in credits (1 credit = $0.01). Every call debits the capability's listed price, and failed provider calls are refunded. The exact billed numbers are on /capabilities. The ledger is append-only.

Your own provider keys

For capabilities that run on your own provider account (BYOK), vault the key once through a one-time vault link: ask your agent for one, or call POST /v1/keys/link. The key is injected server-side and never shown back. Never paste provider keys into chat.

Caps and the kill switch

Set daily or monthly caps per agent, and keep the kill switch ready. Both are checked before a call is dispatched; a denied call says why and who can unblock it.

When the balance runs out

Your agent gets an HTTP 402 with a top-up link it hands to you. After you pay, it retries the same call. Owners can also consent once to an auto-refill mandate within limits they set.

Receipts

Every call lands on a signed audit chain you can export.

API reference

Base URL https://apifare.com. Authenticate every request with Authorization: Bearer <token>.

endpointwhat it does
GET /v1/search?q=Find APIs. Results carry their lane and listed price; misses are logged as demand.
POST /v1/call/{slug}Call an API. Debits its listed price; refunded on provider failure.
GET /v1/balanceYour balance and top-up links.
POST /v1/keys/linkA one-time vault link for your own provider key (BYOK).
POST /v1/signupEmail in, token out (shown once).
POST /v1/topupAgent-initiated top-up through the owner's auto-refill mandate, within owner-set limits.
POST /v1/supportSomething broken? File {tool, expected, actual}; poll the returned status_url.
GET /statusPublic service status.
/proxy/{provider}/{path}Native provider APIs; your vaulted key is injected server-side and never shown.

Examples

curl "https://apifare.com/v1/search?q=weather" \
  -H "authorization: Bearer $APIPAY_TOKEN"

curl -X POST https://apifare.com/v1/call/open-meteo \
  -H "authorization: Bearer $APIPAY_TOKEN" -H "content-type: application/json" \
  -d '{"lat": 51.51, "lon": -0.13}'

MCP

Its core tools are search_apis, call_api, check_balance and get_vault_link. Run it over stdio with npx -y apifare-mcp (token in APIPAY_TOKEN), or connect over streamable HTTP at https://apifare.com/mcp with the bearer header.

Errors

Errors are structured JSON with error, message, and what unblocks you. Every error and its fix: the error catalog.

Guides

Machine-readable

Something broken? POST /v1/support, or open a GitHub issue.