Enterprise Integration.
Build. Integrate. Scale.
Send fault codes and vehicle evidence from your shop management system, fleet platform or scan tool to the Diagnostic Engine over one REST endpoint.
Authentication
Every request carries a partner key in the x-api-key header. There is one credential type: keys begin lp_live_ and are issued by Lane Pilot — email service@lanepilot.io. No Lane Pilot plan unlocks self-serve keys.
Keys are stored server-side only as SHA-256 hashes. A key can be restricted to an IP allowlist, and it carries its own per-minute and monthly session limits.
x-api-key: lp_live_xxxxxxxxxxxxxxxxPOST /diagnose
https://fuuxaiwngfdvypfexpyv.supabase.co/functions/v1/api-gateway/diagnoseThe one live partner endpoint. Send vehicle details, fault codes and any evidence you have; the response is a JSON envelope whose diagnosis.text is Markdown written for a technician. Each call is a full engine run, not a lookup, so give your HTTP client a generous timeout.
Request fields
| Field | 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" }. |
Request body
{
"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"
}
]
}Response (200 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": {
"request_id": "2f8c1f0e-6a43-4c1b-9d55-0b7f4b8e1a2d",
"response_time_ms": 12345,
"partner": "Your Company",
"tier": "starter_integration",
"usage": {
"accounting": "confirmed",
"sessions_used": 42,
"monthly_limit": 10000,
"price_cents": null
}
}
}Sample values are illustrative. The response time is an example, not a measurement: no partner latency has been measured. meta.usage.price_cents is your key’s agreed per-session rate, in cents. diagnosis.text is Markdown; render it rather than parsing its headings, which are not a stable contract. Quote meta.request_id to support.
Limits & Usage Headers
- 60 requests per minute per client IP, across the gateway.
- A per-minute request limit and a monthly session limit set on your key, agreed when it is issued.
- Each
POST /diagnosethat returns 200 with a diagnosis is counted as one session.meta.usage.accountingisconfirmedwhen it was recorded, orunconfirmed(counts null) when recording failed. An engine timeout is a 504 and is not counted.
Headers on every successful response
| X-RateLimit-Remaining | Requests left in the current minute under your key's per-minute limit. |
|---|---|
| X-Sessions-Used | Your key's recorded session count after this call, or "unconfirmed" when recording failed (the diagnosis is still returned). |
| X-Sessions-Limit | Your key's monthly session limit, or "unlimited" when it has none. |
| X-Response-Time-Ms | Time the gateway spent on the request, in milliseconds. |
Errors
Error bodies are JSON with an error message.
| HTTP | When |
|---|---|
| 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. |
| 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). |
| 500 | An unexpected gateway error. The body carries a request_id; nothing is metered. |
| 501 | A suspended endpoint. POST /diagnose is unaffected. |
| 502 | The Diagnostic Engine returned an error, could not be reached, or returned no diagnosis. The body carries a request_id (and the engine's HTTP status when it answered). Not metered. |
| 503 | A rate limiter is briefly unavailable (Retry-After: 5). Retry; nothing is metered. |
| 504 | The Diagnostic Engine timed out. Not metered. |
Code Examples
curl -X POST \
https://fuuxaiwngfdvypfexpyv.supabase.co/functions/v1/api-gateway/diagnose \
-H "Content-Type: application/json" \
-H "x-api-key: lp_live_your_key_here" \
-d '{
"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"
}
]
}'const response = await fetch(
'https://fuuxaiwngfdvypfexpyv.supabase.co/functions/v1/api-gateway/diagnose',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.LANE_PILOT_API_KEY,
},
body: JSON.stringify({
"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"
}
]
}),
}
);
if (!response.ok) {
const { error } = await response.json();
throw new Error(`Lane Pilot ${response.status}: ${error}`);
}
const { diagnosis, meta } = await response.json();
console.log('Diagnosis:', diagnosis.text);
console.log('Usage:', meta.usage.sessions_used, '/', meta.usage.monthly_limit ?? 'unlimited');