Flight Disruption Predictor
The Flight Predictor is the Nexa service that estimates whether an upcoming flight is likely to cancel and, if delayed, how long the delay will be. It runs continuously in the background of every Nexa tenant and is what allows the platform to start sourcing hotel inventory before an airline officially declares a disruption.
The service is fully managed: airlines turn on the feature for an ICAO, and Nexa's workers poll schedules, gather signals, and emit predictions on a hot path (per-flight, seconds) and a cold path (5-minute sweep across all watched flights).
For a deep technical breakdown — multi-agent signal ingestion, feature snapshots, the dual-head Nexa AI Model, the deterministic baseline, and the runtime/trainer feature drift — see Inside the Flight Predictor.
What you get per flight
For every scheduled flight in the next 24 hours, the API exposes:
{
"flightId": "IB6253@2026-04-22T16:00:00Z",
"airportIata": "MAD",
"destinationIata": "JFK",
"departureScheduledAt": "2026-04-22T16:00:00Z",
"cancelProbability": 0.27,
"predictedDelayMinutes": 18,
"confidenceScore": 0.74,
"topFactors": [
{ "type": "weather", "rationale": "Derived from weather signals near MAD" },
{ "type": "rotationChain", "rationale": "Inbound leg arriving 38 min late" },
{ "type": "airlineReliability", "rationale": "Carrier 14d cancel rate 2.1%" }
]
}
| Field | Range | Meaning |
|---|---|---|
cancelProbability | [0, 1] | Calibrated probability that the flight cancels. |
predictedDelayMinutes | [0, 720] | Expected departure delay if it operates. |
confidenceScore | [0, 1] | Heuristic — coverage of explanatory factors, not a calibrated probability. |
topFactors | up to 5 | Human-readable attribution from the multi-agent layer. |
confidenceScore is intentionally not the model's probability output. It grows with the number of independent signals supporting the prediction, so an operator can quickly see whether a forecast is backed by three corroborating factors or just one. Use cancelProbability for thresholding; use confidenceScore to decide how much to trust it.
Endpoints
export NEXA_BASE_URL="https://us-central1.api.nexastudio.io"
List at-risk flights
curl "$NEXA_BASE_URL/airports/MAD/disruptions?windowHours=6" \
-H "Authorization: Bearer $TOKEN"
Returns every flight scheduled at the airport over the next windowHours whose cancelProbability clears the tenant's risk threshold.
Single-flight forecast
curl "$NEXA_BASE_URL/flights/IB6253@2026-04-22T16:00:00Z/forecast" \
-H "Authorization: Bearer $TOKEN"
Ad-hoc prediction (no flight schedule needed)
Useful when modelling hypothetical scenarios — e.g. "what if we swap MAD→JFK for tomorrow at 16:00":
curl -X POST "$NEXA_BASE_URL/predict/flight" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"airportIata": "MAD",
"destinationIata": "JFK",
"departureScheduledAt": "2026-04-22T16:00:00Z",
"flightOpsSeverity": 0.4
}'
Batch prediction
curl -X POST "$NEXA_BASE_URL/predict/batch" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "flights": [/* array of flight refs */] }'
Real-time event stream
The predictor pushes prediction.created, signal.ingested, and job.activity events to subscribers as a real-time event stream. The console uses this for the live disruption dashboard; you can plug your own UI in:
curl -N "$NEXA_BASE_URL/events/stream?airport=MAD" \
-H "Authorization: Bearer $TOKEN"
Accuracy reports
curl "$NEXA_BASE_URL/accuracy/report?days=30" \
-H "Authorization: Bearer $TOKEN"
curl "$NEXA_BASE_URL/accuracy/daily?days=30" -H "Authorization: Bearer $TOKEN"
curl "$NEXA_BASE_URL/accuracy/samples?days=30&limit=100" -H "Authorization: Bearer $TOKEN"
/accuracy/report returns precision/recall/F1 and Brier score for cancellation, plus MAE/RMSE/bias and IATA on-time accuracy for delay. Tenants typically pipe samples into their data warehouse for long-term drift analysis.
How the platform uses it
Once an airline opts an ICAO into the predictor, Nexa's orchestration layer continuously watches cancelProbability × confidenceScore. When a flight crosses the configured threshold (default cancelProbability ≥ 0.6 with confidenceScore ≥ 0.7), the platform:
- Pre-warms the allocation cache — runs a shadow hotel search so offers are hot.
- Optionally reserves contract inventory in
SOFT_HOLDstate, to be confirmed on event. - Alerts the airport operator so they can pre-staff.
None of this books a real room or emails a passenger until the disruption is confirmed. The moment the airline posts the cancellation event, Nexa executes the normal flow against the cached / held resources — which is how the "disruption → booked voucher" time comes down from 30+ minutes to under 2.
Watched airlines vs. watched airports
The unit of work is the airline, not the airport. Turning on the predictor for IBE (Iberia) automatically expands to its subsidiary ICAOs (IBE, IBS, IBB, …) and provisions:
- Per-ICAO push subscriptions to the upstream flight-data source.
- 24-hour rolling pull of scheduled departures every 5 minutes.
- Nightly historical backfill for accuracy reporting.
The legacy "enable forecast per airport" flow remains available but is deprecated.
Configuration knobs
Tenant admins can adjust the predictor through the operations console (or PATCH /tenants/$TENANT_URN/predictor-config):
| Knob | Default | Notes |
|---|---|---|
riskThreshold | 0.6 | Minimum cancelProbability to pre-warm. |
minConfidence | 0.7 | Filter out low-coverage forecasts from the dashboard. |
lookaheadHours | 24 | Forecast horizon. |
softHoldEnabled | false | Whether to reserve contract inventory at threshold. |
holdRoomsCap | 50 | Cap on rooms held per pre-warm. |
Retraining cadence
Nexa retrains the model on a managed cadence. Customers do not run training pipelines.
- Weekly — incremental retrain on new outcomes.
- Quarterly — full retrain with feature refresh and hyperparameter sweep.
- On demand — Nexa runs an off-cycle retrain after material changes (new route footprint, terminal reopen, schedule shift).
Every trained model is versioned in the registry. If a deployment regresses observable accuracy, the rollback is a single registry pointer change — no service interruption.
See also
- Disruption Dashboard — the same data in the operations console (risk map, factor attribution, accuracy report).
- Exception Agent — how the Nexa exception agent triages cases the predictor + allocator can't fully automate.
- Policies — encoding what the platform does with predictor output.
- Inside the Flight Predictor — the full architecture article.