API REFERENCE

Lane Pilot API

RESTful API for vehicle diagnostics and OBD-II telemetry processing. Responses are JSON. Every request carries a partner API key in the x-api-key header.

POST /diagnose
One live endpoint
TLS
Encrypted in transit
All makes · 1996+
Vehicle coverage
Base URLhttps://fuuxaiwngfdvypfexpyv.supabase.co/functions/v1/api-gateway

Quick Start

1

Get your API key

Request a partner key below. Lane Pilot issues keys by hand — no plan unlocks self-serve keys.

2

Make your first call

POST to /diagnose with make and a fault_codes array, plus any evidence you have.

3

Read the response

Render diagnosis.text as Markdown; meta.usage and the X-Sessions-* headers carry your metering.

Enterprise Authentication

Server-to-server API access for tool manufacturers and DMS platforms

Enterprise Request

Send your partner key in the x-api-key header. It is the only credential the gateway accepts; no user login is involved.

curl -X POST https://fuuxaiwngfdvypfexpyv.supabase.co/functions/v1/api-gateway/diagnose \
  -H "Content-Type: application/json" \
  -H "x-api-key: lp_live_a1b2c3d4..." \
  -d '{
    "make": "BMW",
    "model": "X5 xDrive40i",
    "year": 2024,
    "fault_codes": ["P0171"],
    "symptom": "Lean condition bank 1"
  }'

Enterprise Response Headers

Rate limit and usage headers on every successful response.

HTTP/1.1 200 OK
X-RateLimit-Remaining: 59
X-Sessions-Used: 42
X-Sessions-Limit: 10000
X-Response-Time-Ms: 41280
Content-Type: application/json

{
  "meta": {
    "response_time_ms": 41280,
    "partner": "Your Company",
    "tier": "starter_integration",
    "usage": {
      "sessions_used": 42,
      "monthly_limit": 10000,
      "price_cents": null
    }
  }
}
Partner keys: Rates, rate limits and monthly volume are agreed per partner key.
Request API Key
POST/diagnoseCore

The core reasoning endpoint. Submit a vehicle, its fault codes and any evidence you have — receive a JSON envelope whose diagnosis.text is Markdown written for a technician: the likely cause and the next checks to confirm it.

Auth: x-api-key (partner key, lp_live_…)
Rate Limit: 60 requests/min per client IP · per-minute and monthly session limits set on your key

Parameters

NameTypeRequiredDescription
makestringRequiredVehicle make, e.g. "Ford", "Land Rover".
fault_codesstring[]RequiredDTCs as an array, e.g. ["P0016", "P0299"].
modelstringOptionalVehicle model.
yearnumberOptionalModel year.
vinstringOptional17-character VIN.
symptomstringOptionalCustomer concern or tech notes, in plain text.
obd_telemetryobjectOptionalFLAT map of reading → value (numbers or strings). Each pair reaches the engine as a "key: value" line; nested objects are not read.
freeze_frameobject | object[]OptionalOne frame or an array: { "dtc": "P0016", "pids": { reading: value } }.
mode6_resultsobject[]OptionalMode 06 tests: { "test_name" (or "test_id"), "value", "unit", "status": "PASS" | "FAIL" }.

Request

{
  "make": "Ford",
  "model": "F-150",
  "year": 2013,
  "vin": "1FTFW1ET5DFC10312",
  "fault_codes": [
    "P0016",
    "P0299"
  ],
  "symptom": "Rattle on cold start, loss of boost under load",
  "obd_telemetry": {
    "engine_rpm": 780,
    "short_fuel_trim_b1": 18.5,
    "long_fuel_trim_b1": 12.3,
    "coolant_temp_c": 88
  },
  "freeze_frame": [
    {
      "dtc": "P0016",
      "pids": {
        "engine_rpm": 2450,
        "calc_load_pct": 88.4
      }
    }
  ],
  "mode6_results": [
    {
      "test_name": "Catalyst monitor B1",
      "value": 0.42,
      "unit": "ratio",
      "status": "PASS"
    }
  ]
}

Response200 OK

{
  "diagnosis": {
    "text": "### Likely cause\n\nCam/crank correlation fault on bank 1...\n\n### Next check\n\nCompare cam and crank signals at idle...",
    "vehicle": {
      "vin": "1FTFW1ET5DFC10312",
      "make": "Ford",
      "model": "F-150",
      "year": 2013
    },
    "fault_codes": [
      "P0016",
      "P0299"
    ]
  },
  "meta": {
    "response_time_ms": 41280,
    "partner": "Your Company",
    "tier": "starter_integration",
    "usage": {
      "sessions_used": 42,
      "monthly_limit": 10000,
      "price_cents": null
    }
  }
}
POST/diagnoseScanner

Optional fields that carry scan evidence. Each reaches the Diagnostic Engine as plain "key: value" lines alongside the vehicle and codes, so keep obd_telemetry FLAT — a nested object is not read.

Auth: Same as /diagnose
Rate Limit: Same as /diagnose

Parameters

NameTypeRequiredDescription
obd_telemetryobjectOptionalFLAT map of reading → value (numbers or strings). Each pair reaches the engine as a "key: value" line; nested objects are not read.
freeze_frameobject | object[]OptionalOne frame or an array: { "dtc": "P0016", "pids": { reading: value } }.
mode6_resultsobject[]OptionalMode 06 tests: { "test_name" (or "test_id"), "value", "unit", "status": "PASS" | "FAIL" }.

Request

{
  "make": "Ford",
  "fault_codes": [
    "P0016",
    "P0299"
  ],
  "obd_telemetry": {
    "engine_rpm": 780,
    "short_fuel_trim_b1": 18.5,
    "long_fuel_trim_b1": 12.3,
    "coolant_temp_c": 88
  },
  "freeze_frame": [
    {
      "dtc": "P0016",
      "pids": {
        "engine_rpm": 2450,
        "calc_load_pct": 88.4
      }
    }
  ],
  "mode6_results": [
    {
      "test_name": "Catalyst monitor B1",
      "value": 0.42,
      "unit": "ratio",
      "status": "PASS"
    }
  ]
}

Errors

// Every error body is { "error": "..." }
400  make or fault_codes is missing, or the body is not valid JSON.
401  No x-api-key header, or the key is not recognised.
403  The key is revoked, the client IP is not on the key's allowlist, or the credential is not a partner key (lp_live_…).
404  Unknown path. POST /diagnose is the only live route.
429  Over a limit: 60 requests per minute per client IP; your key's per-minute limit (with Retry-After: 60); or your key's monthly session limit (the body carries used and limit).
501  The suspended fleet GET endpoints. They stay off until per-partner data scoping ships; POST /diagnose is unaffected.
502  The Diagnostic Engine returned an error; the body carries its status. Not metered.

Ready to integrate?

Start with 3 free sessions. No credit card required.