Build fleet intelligence into your product.
The Fleet AI REST API gives your application direct access to vehicle health scores, predictive risk signals, real-time telemetry, and operational event streams — without building the ML layer yourself.
Four surfaces. Everything your application needs.
Vehicle health, sensor telemetry, active alerts, and fleet-wide risk — all through one authenticated API.
Vehicle Health API
Per-vehicle predictive health scores, anomaly flags, component risk classification, and recommended service windows — updated from live sensor data every 15 minutes.
Telemetry API
Raw and normalized sensor readings — RPM, coolant temp, battery voltage, fuel rate, engine load, oil pressure — with historical range queries and baseline deviation metrics.
Alerts & Faults API
Active alerts, OBD-II / J1939 fault codes, severity classifications, and resolution status across your fleet. Query by time range, severity, or vehicle group.
Fleet Risk Queue API
The same prioritized ranking your fleet operators use — vehicles sorted by urgency, component affected, service window, and confidence score — as a structured JSON response.
Live Stream & SSE
Subscribe to GET /api/partner/stream with an EventSource and your dashboard updates the instant new telemetry is scored — no polling, no latency, no infrastructure to run.
Drop-in Embed Widget
One <script> tag drops a live vehicle health card into any page. Shows risk score, component diagnosis (injectors, bearings, cooling), sensor health bars, and days-to-service — all updating in real time from the SSE stream.
Predictable endpoints. Consistent JSON.
Standard REST resource paths, HTTP status codes, cursor pagination, and RFC 7807 error format. No proprietary query language, no GraphQL overhead.
?range=24h for a historical window.POST /predict call.# Get risk-ranked fleet summary curl https://your-app.railway.app/api/partner/fleet?minRisk=0.35 \ -H "X-API-Key: $FLEET_AI_API_KEY" # Run a breakdown prediction curl -X POST https://your-app.railway.app/api/partner/predict \ -H "X-API-Key: $FLEET_AI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "vehicleId": "VH-2701", "samples": [{ "rpm": 1850, "coolantTemp": 97, "engineLoad": 78 }] }' # Response { "riskProbability": 0.82, "prediction": "breakdown", "confidence": 0.94 }
// Get risk-ranked fleet and act on critical vehicles const fleet = await fetch('https://your-app.railway.app/api/partner/fleet?minRisk=0.75', { headers: { 'X-API-Key': process.env.FLEET_AI_API_KEY }, }).then(r => r.json()); for (const vehicle of fleet.vehicles) { // riskProbability 0–1; ≥0.75 = critical const pred = await fetch('https://your-app.railway.app/api/partner/predict', { method: 'POST', headers: { 'X-API-Key': process.env.FLEET_AI_API_KEY, 'Content-Type': 'application/json' }, body: JSON.stringify({ vehicleId: vehicle.vehicleId, samples: vehicle.latestSamples }), }).then(r => r.json()); if (pred.riskProbability >= 0.75) { await createWorkOrder({ vehicleId: vehicle.vehicleId, advisoryText: pred.advisoryText }); } }
import os, requests BASE = "https://your-app.railway.app/api/partner" HEADERS = {"X-API-Key": os.environ["FLEET_AI_API_KEY"]} # Get critical vehicles (riskProbability ≥ 0.75) fleet = requests.get(f"{BASE}/fleet?minRisk=0.75", headers=HEADERS).json() for vehicle in fleet["vehicles"]: pred = requests.post(f"{BASE}/predict", headers=HEADERS, json={ "vehicleId": vehicle["vehicleId"], "samples": vehicle["latestSamples"], }).json() if pred["riskProbability"] >= 0.75: create_work_order(vehicle_id=vehicle["vehicleId"], advisory=pred["advisoryText"])
React the moment something changes.
Register a webhook and Fleet AI pushes a signed event to your server the instant a vehicle's health deteriorates, a fault code appears, or a sensor crosses its individual baseline threshold.
All payloads are HMAC-SHA256 signed. Verify the x-fleetai-signature header before processing. Delivery includes automatic retry with exponential backoff.
Live vehicle health in two lines of HTML.
Add a <div> and a <script> tag to any page and get a live-updating vehicle health card. No build step. No framework. Works in any HTML page or web view.
<!-- 1. Container: set data-vehicle to your truck ID --> <div id="fleetai-widget" data-vehicle="TRUCK-001"></div> <!-- 2. Drop-in script — that's it --> <script src="https://fleetaiops.com/embed/fleet-widget.js" data-api-key="YOUR_PARTNER_KEY" data-base-url="https://fleetaiops.com"> </script> <!-- Multiple vehicles on the same page --> <div data-fleetai-vehicle="TRUCK-001"></div> <div data-fleetai-vehicle="TRUCK-002"></div> <div data-fleetai-vehicle="TRUCK-003"></div>
// Raw SSE — build your own UI on top of the stream const es = new EventSource( `https://fleetaiops.com/api/partner/stream` + `?vehicleId=TRUCK-001&apiKey=${YOUR_KEY}` ); es.addEventListener("snapshot", (e) => { const data = JSON.parse(e.data); // data.riskProbability → 0–1 risk score // data.prediction → "failure_imminent" | "healthy" | ... // data.diagnosis → { components: [{ component, confidence, mechanic_action }] } // data.sensorRisks → { coolantTemp: 87, batteryVoltage: 12, ... } // data.advisoryText → plain-English summary renderDashboard(data); }); // Auto-reconnect on drop es.onerror = () => { es.close(); reconnect(); };
The widget is served from /embed/fleet-widget.js — a single self-contained file with no dependencies. The SSE stream also accepts ?vehicleId=* to receive updates for all your vehicles at once.
What teams build on top of it
The Fleet AI API is purpose-built for products that need fleet health intelligence without operating their own ML pipeline.
Auto-generate work orders from risk
Poll the risk queue on a schedule, translate high-risk flags into work orders, and sync them to your shop management system or ERP. Fleet AI handles detection; your system handles the workflow.
Flag vehicles before a claim happens
Subscribe to vehicle.risk_escalated to trigger underwriting reviews, adjust coverage parameters, or route a vehicle to inspection before a roadside event occurs.
Embed predictive health into your UI
Surface Fleet AI's risk queue and sensor drift data inside your own product without building the detection model. Add a health score column to your vehicle table in an afternoon.
Proactive service outreach by VIN
Pull health scores by VIN and surface them in a branded service portal. Trigger automated outreach the moment a vehicle's score drops — before the customer calls about a breakdown.
Block high-risk units before load assignment
Check the health score of any vehicle before assigning a load. Block programmatically or alert dispatchers in real time when a vehicle's risk changes while it's in transit.
Tool-call the API from your AI agent
Expose the Fleet AI API as a tool in an LLM agent, n8n workflow, or Zapier automation. Let the agent pull the risk queue, post to Slack, open Jira tickets, or page on-call when a vehicle flags.
What API access includes
API credentials are provisioned through a sales conversation so we can scope rate limits and data access to your integration. Reach out to get started.
Authentication
X-API-Key header with SHA-256 hashed keys. Raw key shown once at provisioning — never stored in plaintext.
- Per-key rate limits
- Key rotation on request
- Tier-scoped access control
- Usage tracked per key for billing
Response format
All endpoints return JSON with a consistent envelope. Errors include a machine-readable code field alongside the message.
- Predictable
/api/partner/paths - ISO 8601 timestamps throughout
- Batch endpoint for up to 200 vehicles
- HMAC-SHA256 signed webhooks
Reliability
The API runs on the same infrastructure as the Fleet AI platform. Predictions are available within seconds of telemetry submission.
- Webhook retry with exponential backoff
- Node.js fallback when ML service is busy
- Dedicated Slack channel for API partners
- Direct engineering support during integration
Ready to build?
Tell us what you're building and we'll scope API access, provide sample data, and stand up a sandbox environment so you can integrate before committing to a contract.