REST endpoints for AI agents Β· Powered by OpenF1 Β· Built for FOMO Pitwall Agent
Current session timing β positions, gaps, sectors, tyre data for all drivers. Auto-fetches latest active session.
No parameters required. Returns latest OpenF1 session automatically.
{
"session": {
"key": 11228,
"name": "Race",
"type": "Race",
"status": "green",
"circuit": "Albert Park",
"country": "Australia",
"year": 2026,
"remaining": "00:45:12"
},
"drivers": [
{
"pos": 1,
"driver": "PIA",
"full_name": "Oscar Piastri",
"team": "McLaren",
"gap": "leader",
"interval": "--",
"best_lap": "1:19.729",
"last_lap": "1:20.011",
"tyre": "soft",
"tyre_age": 14,
"laps": 27,
"s1": "28.114",
"s2": "19.832",
"s3": "31.783"
}
]
}
β Try it live
Simulates 6 race strategies for a driver using real lap data + degradation model. Returns ranked recommendations with time deltas.
| Param | Type | Default | Description |
|---|---|---|---|
| session_key | number | latest | OpenF1 session key |
| driver | string | P1 driver | Driver acronym (PIA, VER, LECβ¦) or number |
{
"driver": "PIA",
"team": "McLaren Racing",
"race_params": {
"total_laps": 58,
"pit_loss_seconds": 22,
"best_lap_time": "1:19.729"
},
"recommended_strategies": [
{
"rank": 1,
"stops": 2,
"label": "2-stop SβMβH",
"compounds": ["soft", "medium", "hard"],
"estimated_race_time": "1:27:34.211",
"delta": "+0.000",
"delta_seconds": 0
}
],
"optimal_strategy": { "..." }
}
β Try: VER strategy AUS 2025
Full session analysis: pace ranking, team comparison, long-run pace, best sectors, speed trap, and AI-style key insights.
| Param | Type | Default | Description |
|---|---|---|---|
| session_key | number | latest | OpenF1 session key |
{
"session": "FP1 β Australia 2026",
"pace_ranking": [
{
"pos": 1,
"driver": "LEC",
"team": "Ferrari",
"best_lap": "1:20.267",
"gap_to_leader": 0,
"laps_completed": 22
}
],
"team_pace": [{ "pos": 1, "team": "Ferrari", "best_lap": "1:20.267" }],
"long_run_pace": [{ "driver": "NOR", "compound": "medium", "laps": 12, "avg_lap": "1:22.1", "deg_per_lap": "+0.08s/lap" }],
"key_insights": [
"Ferrari showed strongest single-lap pace in FP1",
"McLaren led FP2 with Piastri P1"
]
}
β Try: AUS 2025 Race analysis
Full season calendar with upcoming sessions, countdowns, and race times in UTC and UTC-3 (Buenos Aires).
| Param | Type | Default | Description |
|---|---|---|---|
| year | number | current year | Season year |
| upcoming | boolean | true | false = return full calendar |
{
"next_session": {
"name": "Race",
"country": "Bahrain",
"date": "2026-03-15T15:00:00+00:00",
"countdown": "8d 14h"
},
"upcoming_sessions": [{ "..." }],
"upcoming_races": [
{
"name": "Bahrain Grand Prix",
"circuit": "Bahrain International Circuit",
"race_date": "2026-03-15T15:00:00+00:00",
"race_date_ar": "2026-03-15 12:00 ART",
"countdown": "8d 14h"
}
]
}
β Try: 2025 calendar
Raw telemetry for a specific lap: speed, throttle, brake, gear, DRS, RPM. Use lap=fastest for best lap.
| Param | Type | Default | Description |
|---|---|---|---|
| session_key | number | latest | OpenF1 session key |
| driver | string | first driver | Driver acronym or number |
| lap | number|"fastest" | fastest | Lap number or "fastest" |
{
"driver": "LEC",
"lap": { "number": 42, "duration_formatted": "1:20.267", "is_fastest": true },
"summary": { "max_speed_kmh": 327, "avg_throttle_pct": 68.4 },
"telemetry": [
{ "t": 0, "distance_km": 0, "speed": 180, "throttle": 100, "brake": 0, "gear": 6 },
"... up to 300 data points per lap"
]
}
β Try: VER fastest lap AUS 2025
The mcp-server.js exposes 4 tools for direct integration with Claude/FAMA via the Model Context Protocol.
| Tool | Description |
|---|---|
| f1_live_timing | Current session state β positions, gaps, tyres, sectors |
| f1_strategy_analysis | Race strategy recommendations for a driver |
| f1_session_analysis | Full pace analysis β ranking, teams, sectors, insights |
| f1_upcoming_sessions | Next races & sessions with countdowns |
cd /path/to/f1-live
node mcp-server.js
{
"mcpServers": {
"f1-live": {
"command": "node",
"args": ["/path/to/f1-live/mcp-server.js"],
"env": {
"F1_API_BASE": "https://f1.fomo.com.ar"
}
}
}
}
# In fomo-core agent config, add HTTP tool pointing to:
GET https://f1.fomo.com.ar/api/agent/live
GET https://f1.fomo.com.ar/api/agent/strategy?driver={driver}&session_key={session_key}
GET https://f1.fomo.com.ar/api/agent/analysis?session_key={session_key}
GET https://f1.fomo.com.ar/api/agent/calendar