Quickstart
The API lives at https://api.betflux.ai. Dataset payloads are per-game
Parquet files; the betflux CLI is the fastest way to query them.
-
Get a key. Sign in at betflux.ai (access is currently invite-based — join the Discord if you need an invite), subscribe on the billing page, then mint a key at betflux.ai/account/api-keys. The key is shown once — store it somewhere safe.
-
Install the CLI and check the key. Use uv’s isolated tool install to keep the CLI separate from your Python project:
Terminal window uv tool install betfluxexport BETFLUX_API_KEY=bfx_live_...betflux keys checkAutomatic CLI updates are enabled by default on Linux and macOS. If you need the Python SDK in an active environment, see Installation.
key valid (https://api.betflux.ai)tier: Beta — 120 requests/minusage: 0 rows this month (no row cap on this plan) -
Install the agent plugin. Choose the command for your agent:
Terminal window betflux plugin install --claudeTerminal window betflux plugin install --codexYour agent’s CLI must already be installed. Start a new agent session after installation. See AI agents for other agents and setup details.
-
Find games. Game ids are readable —
LEAGUE_AWAY_HOME_YYYYMMDD— andbetflux gamesis how you discover them:Terminal window betflux games --league MLB --date-from 2026-07-01 --date-to 2026-07-07 -
Pull a dataset. Fetch one game’s graded market results, filtered and rendered locally:
Terminal window betflux get market-results --game MLB_BOS_NYY_20260715 --operator FANDUELOr a date range — the CLI discovers the games, downloads each game’s file, and applies your filters client-side:
Terminal window betflux get closing-lines --league MLB \--date-from 2026-07-01 --date-to 2026-07-07 --market-type MONEYLINE
No SDK? The files are plain HTTP
Section titled “No SDK? The files are plain HTTP”Each dataset is served at GET /v1/games/{game_id}/{dataset} as a Parquet
file. curl saves it; DuckDB queries it:
curl -s "https://api.betflux.ai/v1/games/MLB_BOS_NYY_20260715/market-results" \ -H "Authorization: Bearer $BETFLUX_API_KEY" -o results.parquet
duckdb -c "SELECT operator, market_type, side, closing_odds, outcome FROM 'results.parquet' WHERE market_type = 'MONEYLINE' AND closing_odds IS NOT NULL AND closing_ts < game_start"The closing-field filters keep this example to selections with a pre-game
quote, including when reading a historical v2 artifact. In v3, live-only
selections remain in market-results with a graded outcome and null closing
fields.
DuckDB can also query the authenticated URL directly, without downloading — see Response formats.
Next steps
Section titled “Next steps”- Authentication — key format, tiers, and error semantics.
- Datasets — what each dataset contains and how it’s built.
- Rate limits & quotas — how rows-downloaded metering works.