API reference
Get usage
Your key's token usage this month.
GET
/odds/v1/usage- Cost
- 0 tokens
- Authentication
- X-API-Key, your own key (not the demo key)
Parameters
This endpoint takes no parameters.
Request
The demo key (Free plan) cannot call this endpoint: it answers 403 plan_required. Set ODDS_API_KEY to your own key first.
curl -s "https://api.b337.ai/odds/v1/usage" \
-H "X-API-Key: $ODDS_API_KEY"import os
import requests
resp = requests.get(
"https://api.b337.ai/odds/v1/usage",
headers={"X-API-Key": os.environ["ODDS_API_KEY"]},
timeout=10,
)
resp.raise_for_status()
print(resp.json())// Node 18+, saved as an .mjs file
const res = await fetch("https://api.b337.ai/odds/v1/usage", {
headers: { "X-API-Key": process.env.ODDS_API_KEY },
});
console.log(await res.json());Response
200 OK
{
"key_id": "666ff6ccaa5b", "period": "2026-10-06", "period_type": "billing_cycle",
"period_start": "2026-10-06T03:12:00Z", "period_end": "2026-11-05T03:12:00Z",
"tokens_used": 2, "tokens_limit": 1000, "tokens_remaining": 998,
"resets_at": "2026-11-05T03:12:00Z", "metering": "ok",
"costs": {"sports": 0, "books": 0, "usage": 0, "events": 1,
"odds_main": 1, "odds_extended": 5, "history": 2, "clv": 1,
"ws_connection_minute": 1, "ws_event_minute_main": 1,
"ws_event_minute_extended": 5}
}Fields
period_typeisbilling_cycleon a paid plan (30 days from your billing date;periodis the cycle's start day) orcalendar_monthotherwise (periodis the UTC month).period_start/period_endbound it;resets_atis when the allowance refills.costsis the token price of each call type for your key, matching Tokens & pricing.