Skip to main content

Getting your API key

1

Create an account

Sign up at oddsstream.io/signup. A free account gives you immediate access.
2

Open the Keys page

Go to Dashboard → Keys. Your production key is listed there.
3

Copy your key

Click Copy. The key is shown once in full — after that it’s masked in the dashboard. If you lose it, rotate it to get a new one.Key format: os_live_ followed by 32 hex characters.
os_live_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4

Using the key

Every request must include your key in the X-Api-Key header:
curl "https://api.oddsstream.io/api/odds" \
  -H "X-Api-Key: os_live_YOUR_KEY"

Storing the key securely

Always use environment variables. Never hardcode your key in source code.
# Add to your shell profile or .env file
export ODDSSTREAM_API_KEY=os_live_YOUR_KEY
Never expose your API key in client-side JavaScript. Any key in browser code can be extracted and abused. Always call the API from your server and proxy results to your frontend. Never commit keys to git — use environment variables or a secrets manager.

Key management

From Dashboard → Keys:
ActionWhat it does
CopyRe-copies the masked key — save it when you first create it
RotateGenerates a new key immediately. The old key stops working instantly. Use this if your key was leaked.
RevokePermanently disables the key. You’ll need to create a new one.

Error responses

StatusCodeWhat it meansFix
401unauthorizedKey missing, empty, or doesn’t existCheck the header name and key value
403live_not_on_planRequested live odds without Pro Live planUpgrade to Pro+ Live
403websocket_not_on_planRequested WS token without a plan that includes WebSocketUpgrade to Pro+ RT or Pro+ Live
403bookmaker_not_configuredFree plan: no bookmaker selected in dashboardVisit Dashboard → Billing to pick one
403bookmaker_forbiddenFree plan: requesting a different bookmaker than your selected oneSwitch to your selected bookmaker
429rate_limit_exceededToo many requestsBack off and retry after X-RateLimit-Reset
401 vs 403 in plain English:
  • 401 = “I don’t know who you are” — the key is wrong or missing
  • 403 = “I know who you are, but you can’t access this” — check the specific code for the fix

Rate limit headers

Every response includes:
X-RateLimit-Remaining: 187
X-RateLimit-Reset: 1745160060
When X-RateLimit-Remaining drops below 20, slow down:
const resp = await fetch(url, { headers });
const remaining = Number(resp.headers.get("X-RateLimit-Remaining") ?? 999);
if (remaining < 20) await new Promise(r => setTimeout(r, 5_000));

Plan limits

PlanRate limitWebSocketEndpoints
Free200 req/day30 connections/daySports, Bookmakers, Events, Odds (1 bookmaker)
Pro5,500 req/hrNot included+ Value Bets, all bookmakers
Pro+ RT5,500 req/hrUnlimited+ WebSocket Stream
Pro+ Live5,500 req/hrUnlimited+ Live in-play odds, WebSocket Stream
Upgrade at oddsstream.io/pricing.