Build a sports betting model
with your AI agent.
Looking to build your own betting model with AI and not rely on touted picks? BetFlux is here to help. Your theories, your inputs, backed by data-driven answers. Get connected to your favorite agent and start prompting.
Why asking AI for picks fails, and what to ask instead.
A chatbot asked for tonight’s winners does not have current prices or past results, so it cannot check its answer. Ask it to test an idea against settled games instead, and use the graded results to see whether the idea held up.
The prompt.
Building a betting model has never been easier. Check out this use case of building a fair-value betting model for Pinnacle.
Devig Pinnacle's closing moneyline for "true" probabilities, compare against US books' closing prices to find +EV bets, grade them with market-results outcomes. Backtest with September moneylines.
Outcome
Within minutes, Claude Code and BetFlux identified +EV opportunities and gave follow up suggestions for an iteration to a more effective model.
What surprised us
The first pass flagged 46 +EV bets with an average EV of +28.6%, which was too high to be believable. The agent found that some closing prices were recorded at different times than Pinnacle’s. After it filtered those out, 12 bets remained, with an average EV of +2.1%.
What your agent does.
The agent reads the BetFlux Agent Skill, pulls graded data with the CLI, and writes the analysis scripts itself.
01Learn the data
betflux agent-guideDataset schemas, filters and grading rules loaded.
02Load graded moneylines
betflux get market-results \ --league MLB \ --date-from 2026-09-01 \ --date-to 2026-09-30 \ --market-type MONEYLINE \ --format csv > mlb_ml.csvClosing prices joined to WON / LOST / PUSH for every book.
03De-vig Pinnacle and price each book
python fair_value.py mlb_ml.csvPinnacle's close de-vigged proportionally. EV computed for each FanDuel, DraftKings and BetMGM close against that fair price.
04Grade and report
python grade.py mlb_ml.csvUnits, ROI and expected vs actual wins for every +EV bet.
Sample output.
FanDuel, DraftKings and BetMGM full-game moneyline closes, compared with Pinnacle’s de-vigged close and graded with the final result.
| Bets | Count | Avg EV | Won / expected | ROI |
|---|---|---|---|---|
| US closing prices priced | 2,460 | −3.8% | 1,230 / 1,230.0 | −5.2% |
| Flagged +EV | 46 | +28.6% | 18 / 15.6 | +4.9% |
| Bets | Count | Avg EV | Won / expected | ROI |
|---|---|---|---|---|
| US closes within 15 min of Pinnacle | 862 | −4.3% | 431 / 433.8 | −4.1% |
| Flagged +EV | 12 | +2.1% | 3 / 4.9 | −56.8% |
Illustrative. One BetFlux run on September 2026 MLB and NFL full-game moneylines, 1 unit per bet. Past results do not predict future results.
Across the 862 matched bets, Pinnacle’s fair prices predicted 433.8 wins and the bets won 431. The 12 flagged +EV bets are too few to draw a conclusion.
From a result to a tested AI sports betting model.
A backtest on the same games used to build a model tends to overstate how well it works. A hold-out test builds the model on one set of games and scores it on games it has not seen.
Only keep US closes within 15 minutes of Pinnacle's and drop anything over 15% EV. Fit on September 1–15, then test on September 16–30. Does the fair line still match the results on games the model has not seen?
| Fair probability | Bets | Model said | Actually won |
|---|---|---|---|
| Under 35% | 46 | 28.5% | 34.8% |
| 35–50% | 161 | 43.5% | 39.1% |
| 50–65% | 161 | 56.5% | 60.2% |
| Over 65% | 52 | 74.3% | 69.2% |
Illustrative. One BetFlux run on September 2026 MLB and NFL full-game moneylines, 1 unit per bet. Past results do not predict future results.
On the hold-out games, the fair prices predicted 212.8 wins and the bets won 212. All seven +EV bets in that period lost, against 2.6 expected wins. Seven bets is too small a sample to judge the strategy.
Datasets used.
Closing prices with graded outcomes. This example uses market results only.
Closing linesOpening and closing prices with line-movement summaries and CLV.
Sportsbook oddsEvery price change, useful for checking when each book last updated before the close.
FanDuel, DraftKings, BetMGM and Pinnacle across NFL, NBA, MLB, NHL, NCAAM and NCAAF. History start dates vary by league and book. See coverage →
Works with Codex, Claude Code and Cursor.
Works with agents that support skills and terminal access. Other agents →
Make it your own.
Track closing line value.
“For every NFL moneyline I bet in September, compare my price with the close and tell me my average CLV by book.”
Decode line movement.
“Find MLB moneylines that moved more than 20 cents in the last hour before first pitch. Did the move predict the winner?”
Check a de-vig method.
“Compare proportional and power de-vig on Pinnacle's NFL closes. Which one matched the results better this season?”
Limits and caveats.
One month of moneylines is a small sample, and results on a dozen bets are mostly luck. Pinnacle’s close is a useful benchmark but it is not always right, and closing prices from different books are only comparable when they were recorded at about the same time. Coverage start dates vary by league and book, so check coverage before choosing a backtest range. This page describes research and is not betting advice.
FAQ
How do I use AI for sports betting?
Give your agent a specific idea to test and connect it to historical odds and graded results. The agent writes the code, runs the analysis and reports whether the idea held up.
Can AI help with sports betting?
Yes, as a research tool. An agent can pull odds data, remove the vig, grade bets and check results on games it has not seen. It cannot predict outcomes, so treat its results as research.
What is the best AI for sports betting research?
BetFlux works with any agent that supports skills and terminal access, including Codex, Claude Code and Cursor.
Do I need to know Python to build a betting model?
No. You describe the idea in plain English and your agent writes and runs the Python.
Does AI sports betting work?
It depends on the strategy being tested. Many ideas do not hold up once they are graded against real closing prices, and one month of results is usually too few to separate skill from luck. Testing on games the model has not seen gives a more reliable answer.
How do I use historical data for a betting model?
Build the model on one date range of closing prices and graded outcomes, then test it on a later range. BetFlux market-results includes each closing price with its graded outcome.
Get updates now.
Sign up once the beta ends.
Already have an invite? You’re up. →