Skip to content

Models & Inference

These endpoints control the AI lifecycle: training models on your custom data and running inference to generate risk scores.

Triggers the asynchronous training of an anomaly detection model using the files uploaded to a mission.

  • Overview: Requires at least 15 files uploaded to the mission.
  • Endpoint: /api/calibrate
  • Method: POST
KeyValueRequired
Content-Typeapplication/jsonYes
X-API-KEYYour-API-KeyYes
ParameterTypeRequiredDescription
robot_iduuidYesThe UUID of the robot.
mission_iduuidYesThe UUID of the mission.
robot_typestringYesThe hardware type. Allowed: SPOT, UR6.
blob_nameslist[str]NoList of unique_filenames to train on. Defaults to all.
epochs1intNoTraining epochs (Default: 100).
batch_sizeintNoBatch size for training (Default: 128).
retrainbooleanNoSet true to force retraining (Default: false).

Code: 200 OK

{
"details": {
"task_id": "a493b453-e29b-41d4-a716-446655440000"
},
"message": "Training task queued"
}
  • 400 Bad Request: Expected 15 files, but found X.
  • 400 Bad Request: Model already exists.
  • 401 Unauthorized: Invalid or missing API Key.
import requests
url = "[https://api.ridescan.ai/api/calibrate](https://api.ridescan.ai/api/calibrate)"
headers = {
"Content-Type": "application/json",
"X-API-KEY": "YOUR_API_KEY"
}
payload = {
"robot_id": "e7201eff-e29b-41d4-a716-446655440000",
"mission_id": "9384ac10-e29b-41d4-a716-446655440000",
"robot_type": "SPOT",
"epochs1": 150,
"retrain": True
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())

Runs the trained model against specific files to generate Risk Scores.

  • Overview: The mission must have a trained model (calibration_completed) before you can run inference.
  • Endpoint: /api/process
  • Method: POST
KeyValueRequired
Content-Typeapplication/jsonYes
X-API-KEYYour-API-KeyYes
ParameterTypeRequiredDescription
robot_iduuidYesThe UUID of the robot.
mission_iduuidYesThe UUID of the mission.
blob_nameslist[str]NoList of unique_filenames to analyze. Defaults to all.
devicestringNoDevice to run inference on: cpu or cuda (Default: cpu).

Code: 200 OK

{
"file sent": [
"1a3a81da-e29b-41d4-a716-446655440000_Day16.bag",
"ac8d4704-e29b-41d4-a716-446655440000_Day17.bag"
],
"message": "Processing queued"
}
  • RS-MOD-001: Model not found (Training not completed).
  • 401 Unauthorized: Invalid or missing API Key.
import requests
url = "[https://api.ridescan.ai/api/process](https://api.ridescan.ai/api/process)"
headers = {
"Content-Type": "application/json",
"X-API-KEY": "YOUR_API_KEY"
}
payload = {
"robot_id": "e7201eff-e29b-41d4-a716-446655440000",
"mission_id": "9384ac10-e29b-41d4-a716-446655440000",
"device": "cpu"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())

Retrieves the current status of the AI model and the aggregated risk scores.

  • Endpoint: /api/model/mission-details
  • Method: GET
KeyValueRequired
Content-Typeapplication/jsonYes
X-API-KEYYour-API-KeyYes
ParameterTypeRequiredDescription
mission_iduuidYesThe Public UUID of the mission.

Code: 200 OK

{
"calibration_status": "calibration_completed",
"epochs": 150,
"files": [
{
"filename": "Day10.bag",
"risk_score": 5.4
}
],
"inference_possible": true,
"inference_status": "processing_completed",
"mission_avg_risk_score": 12.5,
"mission_length": 2073,
"robot_type": "SPOT",
"training_time": "Wed, 07 Jan 2026 10:30:00 GMT"
}
  • RS-MSN-002: Mission ID not found.
  • 401 Unauthorized: Invalid or missing API Key.
import requests
url = "[https://api.ridescan.ai/api/model/mission-details](https://api.ridescan.ai/api/model/mission-details)"
headers = {
"Content-Type": "application/json",
"X-API-KEY": "YOUR_API_KEY"
}
params = {
"mission_id": "9384ac10-e29b-41d4-a716-446655440000"
}
response = requests.get(url, params=params, headers=headers)
print(response.json())