Use your client API key to pull sports odds, casino tables, score cards, and the custom Live TV player.
Base URL: https://api.leelabet.com
API key is secret. Use it only from your backend (or secure server code) — never put it in frontend HTML, JS, or iframe URLs. Anyone can copy a key from DevTools.
/v1/sports, odds, casino data): header X-Api-Key: YOUR_KEY onlycurl -H "X-Api-Key: lb_xxx" https://api.leelabet.com/v1/sports
Your package controls sports/casino feeds, media toggles, TV domains, IP allow list, and expiry.
| Method | Path | Notes |
|---|---|---|
| GET | /v1/sports | Sport catalogue (filtered to your package) |
| GET | /v1/tree | Competition / event tree |
| GET | /v1/odds?gmid=&sid= | Market odds for an event. sid defaults to 4 (Cricket) |
GET /v1/odds?gmid=787327544&sid=4 Header: X-Api-Key: lb_xxx
| Method | Path | Notes |
|---|---|---|
| GET | /v1/casino/tables | Tables available to your package |
| GET | /v1/casino/data?type= | Live runners / round for a table type (e.g. teen20) |
| GET | /v1/casino/result?type= | Recent results for a table |
| GET | /v1/casino/tv?type= | Casino Live TV iframe — domain whitelist only, no API key |
GET /v1/casino/data?type=teen20 Header: X-Api-Key: lb_xxx
<iframe src="https://api.leelabet.com/v1/casino/tv?type=teen20" style="width:100%;height:360px;border:0;background:#000" allow="autoplay; fullscreen"></iframe>
Works only when the page domain is in your TV domain whitelist and Casino Live TV is ON.
Media embeds are domain-based — no API key in the iframe. Turn Match TV / Score / Casino TV ON in admin and add the client website to TV domain whitelist.
GET /v1/tv?event_id=EVENT_ID
Requires matchTv + whitelisted domain. Redirects to our player (short-lived ticket, not your API key).
GET /v1/score?gmid=EVENT_ID
Requires score + whitelisted domain.
GET /v1/casino/tv?type=teen20
Requires casinoTv + whitelisted domain.
<iframe src="https://api.leelabet.com/v1/tv?event_id=787327544" allow="autoplay; fullscreen; encrypted-media" style="width:100%;height:360px;border:0;background:#000" ></iframe> <iframe src="https://api.leelabet.com/v1/score?gmid=787327544" style="width:100%;height:120px;border:0" ></iframe> <iframe src="https://api.leelabet.com/v1/casino/tv?type=teen20" style="width:100%;height:360px;border:0;background:#000" ></iframe>
Keep the API key on your server for odds/casino JSON. Never paste ?key= into frontend code.
Whitelist any host: production domain (wiin11.com), localhost, 127.0.0.1, or localhost:3000 — must be listed in admin before embeds work.
401 — missing / invalid / inactive key403 — package restriction (sports/casino/sport id/table/IP/domain/expiry)400 — missing required params (gmid, type, event_id)Health (no key): GET /health and GET /v1/health?key=…
{ "success": false, "message": "Sport not in package" }
/v1/sports with X-Api-Key from your backend.gmid, poll /v1/odds for prices (server-side key)./v1/score and /v1/tv iframes without a key (domain must be whitelisted)./v1/casino/tv?type= with no key.const KEY = "lb_xxx";
const base = "https://api.leelabet.com/v1";
const sports = await fetch(base + "/sports", {
headers: { "X-Api-Key": KEY }
}).then(r => r.json());
const odds = await fetch(base + `/odds?gmid=${gmid}&sid=4`, {
headers: { "X-Api-Key": KEY }
}).then(r => r.json());
Need a key? Contact Leelabet — keys are issued from the API admin panel with sports/casino package checklists.