RacingLLM B2B API Documentation v2.0
REST API for Hong Kong horse racing predictions, analysis, and AI commentary.
Overview
RacingLLM provides Hong Kong horse racing predictions, analysis, and AI-generated commentary via a REST API. All endpoints return JSON. Authentication is via Bearer token (API key).
Base URL: https://api.racingai.site/v1
Authentication
All B2B endpoints require an API key passed as a Bearer token:
curl -H "Authorization: Bearer sk-b2b-xxxxxxxx" \ https://api.racingai.site/v1/b2b/races
API Key Tiers
| Tier | Rate Limit (per min) | Monthly Calls | Overage |
|---|---|---|---|
| Pro | 30 | 10,000 | HK$0.10/call |
| Business | 120 | 50,000 | HK$0.10/call |
| Enterprise | 300 | Unlimited | — |
Error Responses
| Code | Meaning |
|---|---|
| 401 | Missing or malformed Authorization header |
| 403 | Invalid, inactive, or expired API key |
| 429 | Rate limit exceeded (per minute). Retry after 60s. |
| 404 | Resource not found |
| 500 | Internal server error |
{"detail": "Invalid or inactive API key"}Endpoints
/v1/b2b/racesList all available race dates/v1/b2b/races/{'{date}'}List races by date/v1/b2b/races/{'{date}/{venue}/{race_no}'}Full race detail/v1/b2b/predictions/latestLatest predictions/v1/b2b/stats/{'{season}'}Season statistics/v1/b2b/commentary/{'{date}'}AI commentary articlesRace Detail Response
GET /v1/b2b/races/2026-06-10/HV/7
{
"race_date": "2026-06-10",
"venue": "HV",
"race_no": 7,
"distance": 1650,
"race_name": "會員盃",
"race_class": "C3",
"track": "TURF",
"going": "GOOD",
"num_horses": 12,
"horses": [
{
"horse_no": 1,
"horse_name_ch": "金鎗六十",
"draw": 5,
"rating": 110,
"win_odds": 3.5,
"win_prob": 0.25,
"place_prob": 0.65,
"top4_prob": 0.85,
"is_cold": false,
"threat_score": 0.12,
"threat_level": "low"
}
],
"top4_horses": [1, 3, 7, 5],
"confidence": {
"tier": "high",
"model1_hn": 1,
"market1_hn": 1,
"agree": true
}
}Data Dictionary
Prediction Fields
| Field | Type | Description |
|---|---|---|
| win_prob | float (0-1) | Model-estimated win probability |
| place_prob | float (0-1) | Model-estimated place (top-3) probability |
| top4_prob | float (0-1) | Model-estimated top-4 probability |
| is_cold | bool | True if horse is flagged as a cold/dark horse |
| threat_score | float (0-1) | How threatening this cold horse is to favorites |
| threat_level | string | low, medium, or high |
Confidence Tiers
| Tier | Meaning |
|---|---|
| high | Model's #1 pick agrees with market favorite — high reliability |
| medium | Some alignment between model and market |
| low | Model and market disagree — higher uncertainty |
Venues
| Code | Name | Surface |
|---|---|---|
| ST | Sha Tin 沙田 | Turf & Dirt |
| HV | Happy Valley 跑馬地 | Turf |
Rate Limiting Headers
All B2B responses include rate limit information in headers:
X-RateLimit-Minute-Remaining: 29 X-RateLimit-Month-Remaining: 9847 X-RateLimit-Month-Overage: 0
Webhooks (Business tier+)
Available in a future release. Will push race results to your webhook URL within 5 minutes of official results.
Changelog
v2.0 (2026-06-11) — Initial B2B API release. Three pricing tiers: Pro, Business, Enterprise. Endpoints: races, predictions, stats, commentary. API key auth with per-minute and per-month rate limiting.
Contact: your email | API Status: GET /v1/health