Skip to main content

POST /v1/inspections/mechanical

Perform comprehensive mechanical diagnostics using OBD-II data, sensor readings, and AI-powered analysis. Detect engine issues, transmission problems, brake wear, and more.

Request

curl -X POST "https://api.steerai.autos/v1/inspections/mechanical" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "vehicle_id": "veh_1234567890abcdef",
    "obd_data": {
      "dtcs": ["P0420", "P0171"],
      "live_data": {
        "engine_rpm": 850,
        "coolant_temp": 92,
        "intake_temp": 25,
        "maf_rate": 3.2,
        "throttle_position": 0,
        "fuel_pressure": 380,
        "o2_sensor_voltage": 0.45,
        "timing_advance": 15
      },
      "freeze_frame": {
        "P0420": {
          "engine_rpm": 2800,
          "vehicle_speed": 65,
          "coolant_temp": 95
        }
      }
    },
    "test_results": {
      "battery_voltage": 12.6,
      "alternator_output": 14.2,
      "brake_fluid_level": "ok",
      "engine_oil_level": "ok",
      "coolant_level": "ok",
      "transmission_fluid": "ok"
    },
    "options": {
      "include_recommendations": true,
      "severity_threshold": "minor"
    }
  }'

Request Body

FieldTypeRequiredDescription
vehicle_idstringYesVehicle identifier
obd_dataobjectYesOBD-II diagnostic data
obd_data.dtcsarrayNoDiagnostic trouble codes
obd_data.live_dataobjectYesReal-time sensor readings
test_resultsobjectNoManual inspection results
options.include_recommendationsbooleanNoInclude repair recommendations (default: true)
options.severity_thresholdstringNoMinimum severity to report: minor, moderate, severe (default: minor)

Live Data Parameters

ParameterUnitDescription
engine_rpmRPMEngine revolutions per minute
coolant_temp°CEngine coolant temperature
intake_temp°CIntake air temperature
maf_rateg/sMass air flow rate
throttle_position%Throttle position (0-100)
fuel_pressurekPaFuel rail pressure
o2_sensor_voltageVOxygen sensor voltage
timing_advance°Ignition timing advance
vehicle_speedkm/hVehicle speed
engine_load%Calculated engine load

Response

{
  "status": "success",
  "data": {
    "diagnostic_id": "mech_1234567890abcdef",
    "vehicle_id": "veh_1234567890abcdef",
    "status": "completed",
    "created_at": "2024-01-15T11:00:00Z",
    "completed_at": "2024-01-15T11:00:15Z",
    "results": {
      "overall_health": "fair",
      "health_score": 6.8,
      "confidence": 0.91,
      "systems": [
        {
          "system": "engine",
          "status": "needs_attention",
          "health_score": 7.0,
          "issues": [
            {
              "issue_id": "eng_cat_efficiency",
              "component": "catalytic_converter",
              "severity": "moderate",
              "status": "active",
              "description": "Catalytic converter efficiency below threshold",
              "dtc": "P0420",
              "confidence": 0.94,
              "symptoms": [
                "Reduced fuel efficiency",
                "Failed emissions test possible",
                "Check engine light on"
              ],
              "recommended_action": "Replace catalytic converter",
              "urgency": "medium",
              "estimated_repair": {
                "min": 800,
                "max": 1500,
                "currency": "USD",
                "labor_hours": 2.5
              }
            },
            {
              "issue_id": "eng_fuel_trim",
              "component": "fuel_system",
              "severity": "minor",
              "status": "active",
              "description": "System running lean (Bank 1)",
              "dtc": "P0171",
              "confidence": 0.88,
              "symptoms": [
                "Rough idle",
                "Slight hesitation on acceleration",
                "Decreased fuel efficiency"
              ],
              "possible_causes": [
                "Vacuum leak",
                "Dirty MAF sensor",
                "Fuel filter restriction",
                "Weak fuel pump"
              ],
              "recommended_action": "Inspect for vacuum leaks, clean MAF sensor",
              "urgency": "low",
              "estimated_repair": {
                "min": 150,
                "max": 400,
                "currency": "USD",
                "labor_hours": 1.5
              }
            }
          ]
        },
        {
          "system": "transmission",
          "status": "good",
          "health_score": 8.5,
          "issues": []
        },
        {
          "system": "brakes",
          "status": "good",
          "health_score": 8.2,
          "issues": []
        },
        {
          "system": "electrical",
          "status": "good",
          "health_score": 9.0,
          "issues": [],
          "notes": "Battery voltage and alternator output within normal range"
        },
        {
          "system": "cooling",
          "status": "good",
          "health_score": 8.8,
          "issues": []
        },
        {
          "system": "emissions",
          "status": "needs_attention",
          "health_score": 6.5,
          "issues": [
            {
              "issue_id": "emis_cat_001",
              "component": "catalytic_converter",
              "severity": "moderate",
              "status": "active",
              "description": "Emissions system efficiency degraded",
              "recommended_action": "Replace catalytic converter to meet emissions standards"
            }
          ]
        }
      ],
      "maintenance_schedule": {
        "overdue": [],
        "due_soon": [
          {
            "service": "engine_oil_change",
            "miles_remaining": 1200,
            "recommended_date": "2024-02-15"
          }
        ],
        "upcoming": [
          {
            "service": "tire_rotation",
            "miles_remaining": 3500,
            "recommended_date": "2024-04-01"
          }
        ]
      },
      "summary": {
        "total_issues": 2,
        "by_severity": {
          "minor": 1,
          "moderate": 1,
          "severe": 0,
          "critical": 0
        },
        "by_urgency": {
          "immediate": 0,
          "high": 0,
          "medium": 1,
          "low": 1
        },
        "total_estimated_repair": {
          "min": 950,
          "max": 1900,
          "currency": "USD"
        },
        "systems_affected": ["engine", "emissions"]
      }
    },
    "reports": {
      "pdf_url": "https://reports.steerai.autos/mech_1234567890abcdef.pdf",
      "json_url": "https://api.steerai.autos/v1/inspections/mechanical/mech_1234567890abcdef/report"
    }
  },
  "meta": {
    "request_id": "req_mech_xyz789",
    "processing_time": 15.123,
    "diagnostic_protocols": ["OBD-II", "CAN", "AI_Analysis"]
  }
}

Response Fields

FieldTypeDescription
diagnostic_idstringUnique diagnostic inspection identifier
results.overall_healthstringexcellent, good, fair, poor, critical
results.health_scorefloatOverall health score (0-10)
systems[].systemstringVehicle system name
systems[].statusstringgood, needs_attention, critical
issues[].severitystringminor, moderate, severe, critical
issues[].urgencystringimmediate, high, medium, low
issues[].dtcstringOBD-II diagnostic trouble code

Vehicle Systems

Components Analyzed: • Engine performance and efficiency • Fuel system and injectors • Air intake and MAF sensor • Ignition system and timing • Oil pressure and condition • Compression and cylinder health
Components Analyzed: • Shifting performance • Transmission fluid condition • Clutch wear (manual) • Torque converter (automatic) • Gear ratios and synchronizers • Electronic controls
Components Analyzed: • Brake pad/shoe thickness • Rotor/drum condition • Brake fluid level and quality • ABS functionality • Brake pressure and response • Electronic stability control
Components Analyzed: • Battery voltage and health • Alternator output • Starter motor function • Lighting systems • Electronic control modules • Sensor diagnostics
Components Analyzed: • Coolant level and condition • Radiator and hoses • Water pump operation • Thermostat function • Cooling fan operation • Temperature regulation
Components Analyzed: • Catalytic converter efficiency • Oxygen sensors • EVAP system integrity • EGR valve function • PCV system • Emissions compliance

Common DTCs (Diagnostic Trouble Codes)

CodeSystemDescriptionTypical Cause
P0420EmissionsCatalyst efficiency below thresholdFailed catalytic converter
P0171EngineSystem too lean (Bank 1)Vacuum leak, dirty MAF
P0300EngineRandom/multiple cylinder misfireSpark plugs, coils, fuel
P0401EmissionsEGR flow insufficientClogged EGR valve
P0456EmissionsEVAP small leak detectedLoose gas cap, leak
P0442EmissionsEVAP medium leak detectedCracked hoses, purge valve

Error Responses

400 Bad Request

{
  "status": "error",
  "error": {
    "code": "INVALID_OBD_DATA",
    "message": "OBD data format is invalid or incomplete",
    "type": "validation_error",
    "field": "obd_data.live_data"
  }
}

422 Unprocessable Entity

{
  "status": "error",
  "error": {
    "code": "VEHICLE_NOT_OBD_COMPATIBLE",
    "message": "Vehicle does not support OBD-II diagnostics (pre-1996 model)",
    "type": "validation_error",
    "details": {
      "vehicle_year": 1994,
      "minimum_year": 1996
    }
  }
}

Integration with Hardware

OBD-II Adapters

Compatible Devices• Bluetooth OBD-II adapters • WiFi OBD-II adapters • USB OBD-II readers • Professional scan tools • Mobile diagnostic apps

Data Protocols

Supported Protocols• ISO 15765-4 (CAN) • ISO 14230-4 (KWP2000) • ISO 9141-2 • SAE J1850 PWM • SAE J1850 VPW

DeepDiag Integration

For advanced diagnostics beyond OBD-II, integrate with DeepDiag, our comprehensive diagnostic platform:
curl -X POST "https://api.steerai.autos/v1/inspections/deepdiag" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "vehicle_id": "veh_1234567890abcdef",
    "diagnostic_level": "comprehensive",
    "include_mechanical": true
  }'
Pro Tip: Combine mechanical diagnostics with visual inspection for a complete vehicle assessment. Bundle both API calls for discounted pricing.

Webhooks

{
  "event": "mechanical_diagnostic.completed",
  "timestamp": "2024-01-15T11:00:15Z",
  "data": {
    "diagnostic_id": "mech_1234567890abcdef",
    "vehicle_id": "veh_1234567890abcdef",
    "overall_health": "fair",
    "health_score": 6.8,
    "issues_found": 2,
    "critical_issues": 0,
    "report_url": "https://reports.steerai.autos/mech_1234567890abcdef.pdf"
  }
}

Best Practices

Data Privacy: OBD-II data may contain sensitive vehicle information. Ensure you have proper authorization before collecting and transmitting diagnostic data.
  1. Regular Diagnostics: Run diagnostics every 3,000-5,000 miles for optimal monitoring
  2. Multiple Data Points: Collect data under various conditions (idle, acceleration, highway)
  3. Baseline Establishment: Create baseline readings for healthy vehicles
  4. Trend Analysis: Monitor changes over time to predict failures
  5. Combine with Visual: Use both mechanical and visual inspections for complete assessment