Skip to content
Product Documentation

Authentication

Every data endpoint requires a first-party API key sent as a Bearer token:

Authorization: Bearer bfx_live_...

Keys start with bfx_live_. Account key records store only a hash; a lost key must be replaced. Browser-approved CLI login temporarily retains an encrypted delivery copy for retries, erased on acknowledgement and unavailable after the ten-minute login request expires.

  1. Sign up at betflux.ai. Access is currently invite-based; join the Discord to request an invite.
  2. Complete onboarding to activate your beta access.
  3. Run betflux login and approve its code on the website, or mint a key manually at betflux.ai/account/api-keys.

Saved CLI login also authenticates Python Client() when no constructor key or BETFLUX_API_KEY is supplied. See CLI login for headless storage and logout.

Keys can be revoked from the same page. Revocation propagates to the edge within a few minutes — it is not instantaneous.

Endpoint Payload Auth
GET /v1/games/{game_id}/{dataset} Parquet file (the datasets) key
GET /v1/games, /v1/games/{game_id} JSON (game discovery) key
GET /v1/leagues, /v1/teams, /v1/players JSON (reference) key
GET /v1/me JSON (key introspection) key
GET /v1/datasets, /v1/datasets/{name}/schema JSON (dataset discovery) none
/docs, /v1/openapi.json, /llms.txt, /health — none

BetFlux is currently available through the beta. Beta accounts support up to three active API keys and 120 requests per minute. All available historical data is accessible. See Rate limits & quotas for request limits and row usage.

GET /v1/me introspects the calling key — rate limit and row usage:

Terminal window
curl -s "https://api.betflux.ai/v1/me" \
-H "Authorization: Bearer $BETFLUX_API_KEY"

It requires a valid key, and reading it never consumes rows. betflux keys check uses it to report your connection, rate limit, and row usage.

All errors are RFC 9457 problem+json; dispatch on the problem type URI, not the title or status alone.

Status Problem type Meaning What to do
401 invalid-key Missing, malformed, or unknown key Check the header and the key value; detail says what’s wrong
402 subscription-required The key is valid, but the account has no active subscription See the response details and upgrade_url; retry after account access is restored
403 key-disabled Key was revoked or suspended Mint a new key