{"components":{"responses":{"BadRequest":{"content":{"application/json":{"examples":{"symptoms":{"value":{"error":"Symptoms are required"}},"vehicle":{"value":{"error":"Vehicle year, make, and model are required"}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request body failed validation."},"InternalError":{"content":{"application/json":{"example":{"error":"Internal server error"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request could not be processed (including a malformed JSON body)."},"InvalidApiKey":{"content":{"application/json":{"examples":{"deactivated":{"value":{"error":"API key is deactivated."}},"invalid":{"value":{"error":"Invalid API key."}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is unknown or has been deactivated."},"MethodNotAllowed":{"content":{"application/json":{"example":{"error":"Method not allowed"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The endpoint accepts POST only."},"MissingApiKey":{"content":{"application/json":{"example":{"error":"Missing API key. Include x-api-key header."},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No x-api-key header was sent."},"RateLimited":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"description":"The API key exceeded its per-minute rate limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"example":60,"type":"integer"}}}}},"schemas":{"Assessment":{"properties":{"cost_estimate":{"description":"Estimated repair cost range in USD. Editorial planning estimates, not a quote.","properties":{"max":{"example":325,"type":"number"},"min":{"example":155,"type":"number"}},"required":["min","max"],"type":"object"},"description":{"example":"Grinding noises typically indicate worn brake pads that need replacement. This can damage rotors if not addressed promptly.","type":"string"},"probable_issue":{"example":"Brake System Issue","type":"string"},"rate_source":{"description":"Present only when the cost estimate was taken from Wrenchli's shared repair-rate table; absent when the estimate is the assessment category's own range.","example":"wrenchli_editorial_rate_table_v1","type":"string"},"urgency":{"description":"How promptly the issue should be looked at.","enum":["medium","high"],"type":"string"}},"required":["probable_issue","description","urgency","cost_estimate"],"type":"object"},"AssessmentRequest":{"properties":{"location":{"description":"Optional caller-supplied location (e.g. a ZIP code). Recorded with the request for usage accounting; it does not change the assessment.","type":"string"},"symptoms":{"description":"One or more symptoms in the vehicle owner's own words, e.g. \"Grinding noise when braking\". At least one non-empty entry is required.","items":{"type":"string"},"minItems":1,"type":"array"},"vehicle":{"properties":{"make":{"example":"Honda","type":"string"},"mileage":{"description":"Optional current odometer reading in miles.","example":67200,"type":"number"},"model":{"example":"Civic","type":"string"},"year":{"example":2019,"type":"integer"}},"required":["year","make","model"],"type":"object"}},"required":["symptoms","vehicle"],"type":"object"},"AssessmentResponse":{"properties":{"assessment":{"$ref":"#/components/schemas/Assessment","description":"The same assessment object as `diagnosis`, under the assessment name."},"assessment_title":{"description":"The probable issue, repeated as a plain title.","example":"Brake System Issue","type":"string"},"diagnosis":{"$ref":"#/components/schemas/Assessment","description":"The assessment. The field name is retained from the API's first release; `assessment` carries the identical object and is the preferred field for new integrations."},"recommendations":{"properties":{"diy_feasible":{"example":false,"type":"boolean"},"immediate_action":{"example":"Schedule brake inspection within 48 hours","type":"string"},"safety_advice":{"example":"Avoid heavy braking and increase following distance","type":"string"}},"required":["immediate_action","safety_advice","diy_feasible"],"type":"object"},"wrenchli_services":{"properties":{"find_shops_url":{"description":"Wrenchli's page for independent repair shops and the free referral pilot.","format":"uri","type":"string"},"get_quotes_url":{"description":"Wrenchli vehicle-insights page prefilled with this vehicle and symptom.","format":"uri","type":"string"}},"required":["get_quotes_url","find_shops_url"],"type":"object"}},"required":["diagnosis","assessment","assessment_title","recommendations","wrenchli_services"],"type":"object"},"Error":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"},"RateLimitError":{"properties":{"error":{"example":"Rate limit exceeded.","type":"string"},"limit_per_minute":{"description":"The calling key's configured per-minute limit.","type":"integer"},"retry_after_seconds":{"example":60,"type":"integer"}},"required":["error","limit_per_minute","retry_after_seconds"],"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"description":"API key issued to integration partners through the Wrenchli Developers page. Keys are stored hashed (SHA-256) server-side and can be deactivated; each key has its own per-minute rate limit.","in":"header","name":"x-api-key","type":"apiKey"}}},"info":{"contact":{"email":"support@wrenchli.net","name":"Wrenchli","url":"https://www.wrenchli.net/developers"},"description":"Wrenchli's public, key-gated vehicle symptom assessment API. Send a vehicle's year, make, and model plus the symptoms its owner describes, and get back a preliminary symptom assessment: the probable issue, a plain-language description, an urgency level, an estimated repair cost range, and recommended next steps.\n\nThis is a preliminary symptom assessment, not a professional inspection or a repair quote. Cost ranges are Wrenchli editorial planning estimates; where an assessment maps to a repair in Wrenchli's shared rate table, the response carries a `rate_source` field saying so.\n\nThe same operation is served under two names: `/api-assess` (preferred for new integrations) and `/api-diagnose` (the original name, kept and identical). CORS is open because the API is consumed by third-party integrations; every call is authenticated with an API key and rate limited per key. API keys are issued to integration partners through the Wrenchli Developers page (https://www.wrenchli.net/developers).","title":"Wrenchli Assessment API","version":"1.0.0"},"openapi":"3.0.3","paths":{"/api-assess":{"post":{"description":"Returns a preliminary symptom assessment for one vehicle. POST only; other methods return 405. The request is recorded against the API key for rate limiting and usage accounting.","operationId":"assessSymptoms","requestBody":{"content":{"application/json":{"example":{"symptoms":["Grinding noise when braking"],"vehicle":{"make":"Honda","mileage":67200,"model":"Civic","year":2019}},"schema":{"$ref":"#/components/schemas/AssessmentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"assessment":{"cost_estimate":{"max":325,"min":155},"description":"Grinding noises typically indicate worn brake pads that need replacement. This can damage rotors if not addressed promptly.","probable_issue":"Brake System Issue","rate_source":"wrenchli_editorial_rate_table_v1","urgency":"high"},"assessment_title":"Brake System Issue","diagnosis":{"cost_estimate":{"max":325,"min":155},"description":"Grinding noises typically indicate worn brake pads that need replacement. This can damage rotors if not addressed promptly.","probable_issue":"Brake System Issue","rate_source":"wrenchli_editorial_rate_table_v1","urgency":"high"},"recommendations":{"diy_feasible":false,"immediate_action":"Schedule brake inspection within 48 hours","safety_advice":"Avoid heavy braking and increase following distance"},"wrenchli_services":{"find_shops_url":"https://wrenchli.net/for-shops","get_quotes_url":"https://wrenchli.net/vehicle-insights?year=2019&make=Honda&model=Civic&symptom=Grinding%20noise%20when%20braking"}},"schema":{"$ref":"#/components/schemas/AssessmentResponse"}}},"description":"Assessment completed."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/MissingApiKey"},"403":{"$ref":"#/components/responses/InvalidApiKey"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"summary":"Assess vehicle symptoms"}},"/api-diagnose":{"post":{"description":"The original name of the assessment operation, kept for existing integrations. The request and response contract is identical to POST /api-assess; new integrations should prefer /api-assess.","operationId":"assessSymptomsLegacyName","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentResponse"}}},"description":"Assessment completed."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/MissingApiKey"},"403":{"$ref":"#/components/responses/InvalidApiKey"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"summary":"Assess vehicle symptoms (original endpoint name)"}}},"security":[{"ApiKeyAuth":[]}],"servers":[{"description":"Wrenchli production API","url":"https://aunrktvltmyrxtdygykt.supabase.co/functions/v1"}]}