{"openapi":"3.1.0","info":{"title":"Garage for Muse API","version":"0.1.0","description":"Connected-car data and alerts for personal AI agents. Authenticate with OAuth 2.1 (PKCE) or a personal API key from /account.","x-agent-instructions":"Garage connects the user's car (46 brands via Smartcar) to the assistant. Call list_vehicles first if you do not know the vehicle id; when there is exactly one car, tools accept no vehicle_id. Prefer get_vehicle_state without refresh (data is pushed by the car); use refresh=true only when the user needs a live reading. Distances are kilometres, pressures kPa; convert to the user's units when speaking. Commands (lock, unlock, charging) change the physical car: always confirm with the user before calling them. If a tool reports that the subscription is inactive, give the user the account link instead of retrying."},"servers":[{"url":"https://garage.keelcroft.com/v1"}],"security":[{"oauth2":["vehicle:read","alerts:read"]},{"apiKey":[]}],"paths":{"/me":{"get":{"operationId":"getMe","summary":"Account and subscription status","responses":{"200":{"description":"OK"}}}},"/vehicles":{"get":{"operationId":"listVehicles","summary":"List connected vehicles","parameters":[{"name":"refresh","in":"query","schema":{"type":"boolean"},"description":"Re-sync from the car maker account."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VehicleList"}}}}}}},"/vehicles/{vehicleId}/state":{"get":{"operationId":"getVehicleState","summary":"Current vehicle state (battery/fuel, range, odometer, locks, tires, location)","parameters":[{"name":"vehicleId","in":"path","required":true,"schema":{"type":"string"}},{"name":"refresh","in":"query","schema":{"type":"boolean"},"description":"Poll the car for fresh data."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VehicleStateResult"}}}},"402":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vehicles/{vehicleId}/recalls":{"get":{"operationId":"checkRecalls","summary":"Open NHTSA safety recalls","parameters":[{"name":"vehicleId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vehicles/{vehicleId}/alert-preferences":{"put":{"operationId":"setAlertPreferences","summary":"Update alert thresholds","parameters":[{"name":"vehicleId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertPreferences"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/alerts":{"get":{"operationId":"listAlerts","summary":"Proactive alerts (low battery, charging done, tire pressure, recalls, ...)","parameters":[{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"vehicle_id","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK"}}}}},"components":{"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://garage.keelcroft.com/authorize","tokenUrl":"https://garage.keelcroft.com/oauth/token","scopes":{"vehicle:read":"Read vehicle state","alerts:read":"Read proactive alerts","vehicle:control":"Lock/unlock and control charging"}}}},"apiKey":{"type":"http","scheme":"bearer","description":"Personal API key (gk_...) created at /account"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error","code"]},"Vehicle":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"make":{"type":["string","null"]},"model":{"type":["string","null"]},"year":{"type":["integer","null"]},"powertrain":{"type":["string","null"],"description":"BEV, PHEV, HEV or ICE"},"vin":{"type":["string","null"]},"last_seen_at":{"type":["string","null"],"format":"date-time"}}},"VehicleList":{"type":"object","properties":{"vehicles":{"type":"array","items":{"$ref":"#/components/schemas/Vehicle"}}}},"VehicleState":{"type":"object","description":"Distances in km, pressures in kPa, percentages 0-100.","properties":{"battery_percent":{"type":"number"},"battery_range_km":{"type":"number"},"charging":{"type":"boolean"},"charge_cable_connected":{"type":"boolean"},"charge_limit_percent":{"type":"number"},"charging_status":{"type":"string"},"minutes_to_full":{"type":"number"},"fuel_percent":{"type":"number"},"fuel_range_km":{"type":"number"},"oil_life_percent":{"type":"number"},"odometer_km":{"type":"number"},"locked":{"type":"boolean"},"doors_open":{"type":"integer"},"location":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}}},"at_home":{"type":"boolean"},"tires_kpa":{"type":"array","items":{"type":"number"}},"vin":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"unavailable":{"type":"array","items":{"type":"string"}}}},"VehicleStateResult":{"type":"object","properties":{"vehicle":{"$ref":"#/components/schemas/Vehicle"},"state":{"$ref":"#/components/schemas/VehicleState"},"summary":{"type":"string"},"source":{"type":"string","enum":["cache","live"]}}},"AlertPreferences":{"type":"object","properties":{"low_battery_percent":{"type":"number"},"low_fuel_percent":{"type":"number"},"low_oil_life_percent":{"type":"number"},"tire_pressure_min_kpa":{"type":"number"},"service_interval_km":{"type":"integer"},"notify_charge_complete":{"type":"boolean"},"notify_unlocked":{"type":"boolean"}}}}}}