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.
Start with an active BetFlux account. Access is currently invite-based —
join the Discord if you need an invite.
After signup, Getting started walks you
through the same setup below.
-
Install the CLI.
Install uv first (optional)
Skip this if you already have uv. On macOS or Linux, run:
Terminal window curl -LsSf https://astral.sh/uv/install.sh | shRestart your terminal after installation. uv will also install Python if needed. For Windows and other options, see the uv installation guide.
Terminal window uv tool install betfluxAutomatic CLI updates are enabled by default on Linux and macOS. See CLI updates for controls and supported installations.
Requires Python 3.10 or later.
Terminal window pip install betfluxSee Installation.
-
Authenticate the CLI.
Terminal window betflux loginEnter the terminal code in your browser and select Approve access. The CLI saves a key in your system keychain for CLI commands and Python clients. Run
betflux keys checkto verify access. See Browser login. -
Install the agent plugin. Choose the command for your agent:
Terminal window betflux plugin install --codexTerminal window betflux plugin install --claudeYour 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. Each row is the full game record: schedule, teams, score, venue, and weather.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, beta access, and error semantics.
- Datasets — what each dataset contains and how it’s built.
- Rate limits & quotas — per-minute limits and how games per billing period are counted.