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.
https://fuuxaiwngfdvypfexpyv.supabase.co/functions/v1/api-gatewayRequest a partner key below. Lane Pilot issues keys by hand — no plan unlocks self-serve keys.
POST to /diagnose with make and a fault_codes array, plus any evidence you have.
Render diagnosis.text as Markdown; meta.usage and the X-Sessions-* headers carry your metering.
Server-to-server API access for tool manufacturers and DMS platforms
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"
}'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
}
}
}/diagnoseCoreThe 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.
| Name | Type | Required | Description |
|---|---|---|---|
| make | string | Required | Vehicle make, e.g. "Ford", "Land Rover". |
| fault_codes | string[] | Required | DTCs as an array, e.g. ["P0016", "P0299"]. |
| model | string | Optional | Vehicle model. |
| year | number | Optional | Model year. |
| vin | string | Optional | 17-character VIN. |
| symptom | string | Optional | Customer concern or tech notes, in plain text. |
| obd_telemetry | object | Optional | FLAT map of reading → value (numbers or strings). Each pair reaches the engine as a "key: value" line; nested objects are not read. |
| freeze_frame | object | object[] | Optional | One frame or an array: { "dtc": "P0016", "pids": { reading: value } }. |
| mode6_results | object[] | Optional | Mode 06 tests: { "test_name" (or "test_id"), "value", "unit", "status": "PASS" | "FAIL" }. |
{
"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"
}
]
}{
"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
}
}
}/diagnoseScannerOptional 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.
| Name | Type | Required | Description |
|---|---|---|---|
| obd_telemetry | object | Optional | FLAT map of reading → value (numbers or strings). Each pair reaches the engine as a "key: value" line; nested objects are not read. |
| freeze_frame | object | object[] | Optional | One frame or an array: { "dtc": "P0016", "pids": { reading: value } }. |
| mode6_results | object[] | Optional | Mode 06 tests: { "test_name" (or "test_id"), "value", "unit", "status": "PASS" | "FAIL" }. |
{
"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"
}
]
}// 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.Start with 3 free sessions. No credit card required.