{"openapi":"3.1.0","info":{"title":"apifare","version":"2.0.0","description":"Prepaid, capped, auditable API balance for AI agents. Auth: Authorization: Bearer <token>. Errors: see /errors.md."},"servers":[{"url":"https://apifare.com"}],"paths":{"/v1/signup":{"post":{"summary":"Create account; returns bearer token (shown once) + 500 free credits","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string"},"origin":{"type":"string"},"referred_by":{"type":"string","description":"referrer public_ref; +500 credits both sides on first successful call"}}}}}}}},"/v1/search":{"get":{"summary":"Search the capability catalog; results carry slug, lane, price, params","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}}]}},"/v1/call/{slug}":{"post":{"summary":"Call a capability; debits the listed price; refunds on provider failure; 402 with payment instructions when balance is low","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}]}},"/proxy/{provider}/{path}":{"post":{"summary":"Native passthrough: the provider's own API shape, key injected, governance before forward"}},"/v1/balance":{"get":{"summary":"Balance + top-up links"}},"/v1/activity":{"get":{"summary":"Last calls (metadata) + balance — powers the first-receipt screen"}},"/v1/topup":{"post":{"summary":"Agent-initiated top-up via the owner's standing mandate; 402 with instructions when no mandate"}},"/v1/mandate":{"get":{"summary":"Auto-refill state"},"put":{"summary":"Adjust threshold/refill/ceiling/enabled"},"delete":{"summary":"Disable + forget card"}},"/v1/keys/link":{"post":{"summary":"One-time vault link for BYOK keys (never paste keys in chat)"}},"/v1/agents":{"get":{"summary":"List agent tokens"},"post":{"summary":"Create a named agent token"}},"/v1/policies":{"get":{"summary":"Account policies"},"put":{"summary":"Set caps/allowlists"}},"/v1/support":{"post":{"summary":"File a structured problem (metadata only); poll the returned status_url"}},"/status":{"get":{"summary":"Public service status"}},"/v1/public-stats":{"get":{"summary":"Public counters (organic calls routed, credits honored)"}}}}