Skip to main content

Predictions & Anomaly Detection

AI-powered remaining useful life (RUL) estimation, anomaly detection, and predictive narratives.

Fleet predictions

GET /machines/predictions/fleet

Auth: Bearer JWT (any role)

Returns RUL predictions for all machines in the fleet.

{
"predictions": [
{
"machine_id": "uuid",
"machine_name": "CNC Mill #1",
"health_score": 82,
"estimated_days_to_failure": 45,
"risk_level": "medium",
"top_risk_metric": "vibration"
}
]
}

Machine prediction

GET /machines/{machine_id}/prediction

Auth: Bearer JWT (any role)

ParameterTypeDefault
languagestringen

Detailed prediction for a single machine including per-metric health scores.

AI narrative

GET /machines/{machine_id}/prediction/narrative

Auth: Bearer JWT (any role)

Returns an AI-generated natural language summary of the machine's health status and predicted trends. Supports multiple languages.

{
"machine_id": "uuid",
"narrative": "CNC Mill #1 is showing early signs of bearing degradation. Vibration levels have increased 15% over the past 2 weeks, with the X-axis showing the most significant change. At current degradation rates, bearing replacement is recommended within the next 30-45 days to avoid unplanned downtime.",
"language": "en",
"generated_at": "2026-04-04T10:30:00Z"
}

Prediction history

GET /machines/{machine_id}/prediction/history

Auth: Bearer JWT (any role)

ParameterTypeDefaultRange
daysint301-365

Returns historical prediction snapshots to track how health scores and RUL estimates evolve over time.

Anomaly summary

GET /machines/{machine_id}/anomalies/summary

Auth: Bearer JWT (any role)

Returns anomaly event counts for the last 7 days, broken down by metric.

{
"machine_id": "uuid",
"period_hours": 168,
"anomalies": [
{"metric_name": "vibration", "count": 12, "latest_at": "2026-04-04T09:15:00Z"},
{"metric_name": "temperature", "count": 3, "latest_at": "2026-04-03T22:00:00Z"}
],
"total_count": 15
}

Detection methods

Haltless uses three complementary anomaly detection methods:

MethodDescriptionParameters
Static baselineZ-score against 7-day mean/stddevThreshold: 3.0 std devs
EWMAExponentially weighted moving averageSpan: 20, warmup: 10 readings
Rate-of-changeFirst-difference velocity analysisWindow: 5, z-threshold: 3.5

Anomaly sub-scores are blended into the composite health score:

health_score = (0.7 * alert_score) + (0.3 * anomaly_score)