Price a list of game ids against the period's games allowance without counting any.
const url = 'https://api.betflux.ai/v1/me/games/preview';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"game_ids":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.betflux.ai/v1/me/games/preview \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "game_ids": [ "example" ] }'What reading each game would cost right now: new would count it, already and exempt are free, restricted is outside the free sample and refused, invalid is not a game id. fits and over_by say whether the gateway would refuse any of the new games today. Counts nothing, is reachable at the allowance, and answers 503 instead of guessing when the usage ledger is unreachable.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Public game ids (LEAGUE_AWAY_HOME_YYYYMMDD, case-insensitive, at most 64 characters each), 1 to 5,000, answered in this order.
Examplegenerated
{ "game_ids": [ "example" ]}Responses
Section titled “Responses”The cost of each game and the period’s counters.
object
One entry per requested id, in request order.
object
The id exactly as sent.
new: a read would count the game; already: recorded this period (counted or exempt), so free; exempt: dated within the plan’s recent-game window, so free; restricted: outside the free sample (the first weekend of a month), so every dataset refuses it with 403 history-restricted; invalid: not a public game id.
Distinct games counted so far this period.
Games the plan allows per period; null when uncapped.
New games the period still allows; null when uncapped.
Whether the gateway would admit every new game right now: false only when enforced and the new games outnumber games_remaining.
How many of the new games would be refused; 0 whenever fits.
Whether the allowance is enforced for this key today. False on an uncapped plan, and while a plan’s allowance is still being measured — then fits is always true.
Example
{ "games": [ { "cost": "new" } ]}Validation failed — unknown or invalid query parameter, or a malformed range (problem type validation-error).
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}Missing, malformed, or unrecognized API key (problem type invalid-key).
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}The key is valid, but the account has no active subscription (problem type subscription-required). The response includes upgrade_url.
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}API key revoked or suspended (problem type key-disabled); a feature the plan does not include (problem type plan-excludes, with feature — live for the live sportsbook-lines routes, league_datasets for league-scoped datasets — required_tiers and upgrade_url; never worth retrying on the same key); or a game outside the key’s history window (problem type history-restricted): a trial key reads only games dated the first Saturday of a month or the Sunday after it, and its 403 carries upgrade_url and sample: "first-weekend".
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}Rate limit, games allowance, or ops throttle — the problem type distinguishes rate-limited, quota-exhausted and throttled. quota-exhausted refuses only a new game past the period’s allowance (games already counted stay readable) and carries reset_at, upgrade_url, game_id, games_used and games_allowance.
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}The usage ledger did not answer (problem type internal-error, title Usage ledger unavailable). Nothing was counted; retry shortly.
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}