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 APIFARE_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.

Shortcut: let your agent do both steps

If your agent can browse the web, paste this to it and it gets a key and connects itself:

set up https://apifare.com/SKILL.md

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. Over the API: PUT /v1/policies for the account, PUT /v1/agents/{id}/policies for one agent.

Balance and top-ups

There's no login: your key is your account. Check your balance any time by asking your agent, or on your balance page (paste your key). Over the API, GET /v1/balance returns it with your top-up links.

  1. Your agent tells you. When the balance runs out, your agent hands you a top-up link, then retries the same call once you pay. Credits appear seconds after payment.
  2. Check any time. Ask your agent "what's my apifare balance?", or open your balance page and paste your key. There's no login: your key is your account.
  3. Or never think about it. Turn on auto-refill once, and the balance refills itself within the limits you set.

Receipts

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

API reference

Base URL https://apifare.com. Send Authorization: Bearer <token> on every /v1 and /proxy request; only signup, token recovery and /status go without.

endpointwhat it does
GET /v1/search?q=Find APIs and catalog tools. Results carry their lane and listed price; catalog tools also carry proxy_route and input_schema. Misses are logged as demand.
POST /v1/call/{slug}Call a built-in API (lane master or vault) with its params as the JSON body. 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).
PUT /v1/policiesAccount caps and allow/deny lists: max_per_call_credits, daily_cap_credits, monthly_cap_credits, adapter_allowlist, adapter_denylist. Per agent: PUT /v1/agents/{id}/policies.
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, returned verbatim. apifare injects the key server-side: its own for dataforseo, open-meteo and catalog tools, your vaulted one for the rest. Catalog tools run here: POST the search result's proxy_route with the tool's input JSON.

Examples

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

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

MCP

Its core tools are search_apis, call_api, proxy_call (runs catalog tools), check_balance and get_vault_link. Run it over stdio with npx -y apifare-mcp (token in APIFARE_TOKEN), or connect over streamable HTTP at https://apifare.com/mcp with the bearer header; the remote endpoint has every tool except proxy_call for now.

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.