Getting started
Authentication
Every request carries your API key in the X-API-Key header.
API keys
Send your key in the X-API-Key header on every request. A missing or unknown key returns 401 invalid_api_key.
curl -s "https://api.b337.ai/odds/v1/usage" -H "X-API-Key: $ODDS_API_KEY"Keep the key on your server. Anyone holding it spends your tokens.
Demo key
X-API-Key: demo needs no signup and is exactly the Free plan: not metered, 10 requests a minute per IP. What it can do:
/sportsand/booksin full./booksrows carrymin_plan(plan id) andmin_plan_name, the cheapest plan with that book./eventsand/odds: tier-1 books only (sportsbet,tab,neds,ladbrokes,betr,pointsbet,tabtouch,bet365), main markets only (head_to_headplus each sport's main line and total),tier=mainonly. Noopen_odds,close_odds,fair_*, or bookurl, and no finished events./racing/meetingsand/racing/race: the next 3 races to go (per country and race type when filtered), tier-1 books, win prices only. No Betfair, tote or results./history,/clv,/racing/historyand the WebSocket answer403 plan_required./usageanswers403 demo_not_allowed.
The examples in these docs run with the demo key where the Free plan serves a meaningful answer; the rest use ODDS_API_KEY. A request outside the plan fails before any token is charged. See Errors.
WebSocket
Connect with the same X-API-Key header, or pass ?api_key= on the URL: browsers cannot set headers on a WebSocket.
wss://api.b337.ai/odds/v1/ws?api_key=YOUR_API_KEY