{"openapi":"3.1.0","info":{"title":"Building Energy & Facilities Intelligence API","version":"1.0.0","description":"Read supplied meter readings, bills, tariffs, equipment history, and occupancy to flag unusual usage and maintenance needs without inventing tariffs or savings. Paid with x402 exact USDC on Base. No account is required.","contact":{"email":"support@brainiac.software"},"x-guidance":"BRAINIAC.software is a pay-per-call API for software agents. No account or API key is required.\nPayment uses the x402 protocol with exact USDC on Base (chain id 8453). Each POST operation has a fixed USD price.\nHow to call an operation:\n1. POST a JSON body matching the operation's requestBody schema to the operation path. Include an Idempotency-Key header (64 hex characters, 32 random bytes).\n2. If you have not paid, the server responds 402 with payment requirements in the body. Pay the exact amount to the payTo address on Base.\n3. Retry the identical request with the same Idempotency-Key and add a payment-signature header containing the x402 payment payload. On success (200) the operation result is returned.\n4. Reuse the same Idempotency-Key only for retries of the same operation and request body; it will not be charged twice.\nAll outputs are compliance prechecks, drafts, or data lookups for human review. They are not official determinations, legal advice, identity confirmation, or certified filings. Verify time-sensitive or official data with the cited source before acting."},"servers":[{"url":"https://www.brainiac.software"}],"paths":{"/api/v1/building-energy/consumption-analyze":{"post":{"operationId":"analyze_building_energy_consumption","summary":"Analyze building energy consumption","description":"Calculate interval consumption and tariff-based cost from supplied meter readings and rates. Missing tariffs are not invented.","tags":["building-energy"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"buildings":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"area":{"type":"number","minimum":0,"maximum":1000000000},"areaUnit":{"type":"string","maxLength":40}},"additionalProperties":false}},"meters":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"utility":{"type":"string","maxLength":80},"unit":{"type":"string","maxLength":40}},"additionalProperties":false}},"readings":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"meterId":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"at":{"type":"string","maxLength":40},"value":{"type":"number","minimum":0,"maximum":1000000000},"unit":{"type":"string","maxLength":40},"cumulative":{"type":"boolean"}},"additionalProperties":false}},"tariffs":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"utility":{"type":"string","maxLength":80},"unit":{"type":"string","maxLength":40},"rate":{"type":"number","minimum":0,"maximum":1000000},"fixedCharge":{"type":"number","minimum":0,"maximum":1000000000},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false}},"bills":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"utility":{"type":"string","maxLength":80},"periodStart":{"type":"string","maxLength":40},"periodEnd":{"type":"string","maxLength":40},"quantity":{"type":"number","minimum":0,"maximum":1000000000},"unit":{"type":"string","maxLength":40},"cost":{"type":"number","minimum":0,"maximum":1000000000}},"additionalProperties":false}},"equipment":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"type":{"type":"string","maxLength":80},"ratedCapacity":{"type":"number","minimum":0,"maximum":1000000000},"capacityUnit":{"type":"string","maxLength":40},"installedAt":{"type":"string","maxLength":40},"lastServiceAt":{"type":"string","maxLength":40},"nextServiceDue":{"type":"string","maxLength":40},"runtimeHours":{"type":"number","minimum":0,"maximum":1000000000},"faultCount":{"type":"number","minimum":0,"maximum":1000000},"efficiency":{"type":"number","minimum":0,"maximum":1000000},"ratedEfficiency":{"type":"number","minimum":0,"maximum":1000000},"supplyTemp":{"type":"number","minimum":-100,"maximum":200},"returnTemp":{"type":"number","minimum":-100,"maximum":200},"setpoint":{"type":"number","minimum":-100,"maximum":200}},"additionalProperties":false}},"occupancy":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"periodStart":{"type":"string","maxLength":40},"periodEnd":{"type":"string","maxLength":40},"occupants":{"type":"number","minimum":0,"maximum":1000000},"hoursOccupied":{"type":"number","minimum":0,"maximum":1000000}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"meters":[{"id":"M-1","buildingId":"B-1","name":"Main electric","utility":"electric","unit":"kWh"}],"readings":[{"id":"R-1","meterId":"M-1","buildingId":"B-1","at":"2026-11-01","value":1000,"unit":"kWh","cumulative":true},{"id":"R-2","meterId":"M-1","buildingId":"B-1","at":"2026-11-08","value":1140,"unit":"kWh","cumulative":true},{"id":"R-3","meterId":"M-1","buildingId":"B-1","at":"2026-11-15","value":1280,"unit":"kWh","cumulative":true}],"tariffs":[{"id":"T-1","utility":"electric","unit":"kWh","rate":0.12,"fixedCharge":10,"asOf":"2026-11-01"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"meterId":{"type":"string"},"buildingId":{"type":"string"},"utility":{"type":"string"},"unit":{"type":"string"},"intervalCount":{"type":"number"},"totalQuantity":{"type":"number"},"totalQuantitySupplied":{"type":"boolean"},"daySpan":{"type":"number"},"daySpanSupplied":{"type":"boolean"},"averagePerDay":{"type":"number"},"averagePerDaySupplied":{"type":"boolean"},"cost":{"type":"number"},"costSupplied":{"type":"boolean"},"tariffId":{"type":"string"},"tariffInvented":{"type":"boolean"},"periodStart":{"type":"string"},"periodEnd":{"type":"string"}},"additionalProperties":true}},"billCount":{"type":"number"},"tariffInvented":{"type":"boolean"},"performanceInvented":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"},"equipmentControlled":{"type":"boolean"},"findings":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"analyzed","items":[{"meterId":"M-1","buildingId":"B-1","utility":"electric","unit":"kWh","intervalCount":2,"totalQuantity":280,"totalQuantitySupplied":true,"daySpan":14,"daySpanSupplied":true,"averagePerDay":20,"averagePerDaySupplied":true,"cost":43.6,"costSupplied":true,"tariffId":"T-1","tariffInvented":false,"periodStart":"2026-11-01","periodEnd":"2026-11-15"}],"billCount":0,"tariffInvented":false,"performanceInvented":false,"savingsGuaranteed":false,"equipmentControlled":false,"findings":[],"limitations":["Meter readings, bills, tariffs, equipment records, and occupancy rows are copied only from labeled fields supplied by the caller.","Consumption and cost use supplied units and tariffs only. Missing tariffs are not invented.","Unusual usage is compared against a baseline calculated from supplied readings for the same meter or utility.","Buildings are compared only when measurement periods and units are compatible.","Equipment performance and savings are never invented. HVAC and connected equipment are never controlled."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/building-energy/meter-reading-anomaly-detect":{"post":{"operationId":"detect_meter_reading_anomalies","summary":"Detect meter reading anomalies","description":"Flag unusual daily usage against a baseline calculated from supplied intervals and explain the comparison method.","tags":["building-energy"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"buildings":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"area":{"type":"number","minimum":0,"maximum":1000000000},"areaUnit":{"type":"string","maxLength":40}},"additionalProperties":false}},"meters":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"utility":{"type":"string","maxLength":80},"unit":{"type":"string","maxLength":40}},"additionalProperties":false}},"readings":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"meterId":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"at":{"type":"string","maxLength":40},"value":{"type":"number","minimum":0,"maximum":1000000000},"unit":{"type":"string","maxLength":40},"cumulative":{"type":"boolean"}},"additionalProperties":false}},"tariffs":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"utility":{"type":"string","maxLength":80},"unit":{"type":"string","maxLength":40},"rate":{"type":"number","minimum":0,"maximum":1000000},"fixedCharge":{"type":"number","minimum":0,"maximum":1000000000},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false}},"bills":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"utility":{"type":"string","maxLength":80},"periodStart":{"type":"string","maxLength":40},"periodEnd":{"type":"string","maxLength":40},"quantity":{"type":"number","minimum":0,"maximum":1000000000},"unit":{"type":"string","maxLength":40},"cost":{"type":"number","minimum":0,"maximum":1000000000}},"additionalProperties":false}},"equipment":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"type":{"type":"string","maxLength":80},"ratedCapacity":{"type":"number","minimum":0,"maximum":1000000000},"capacityUnit":{"type":"string","maxLength":40},"installedAt":{"type":"string","maxLength":40},"lastServiceAt":{"type":"string","maxLength":40},"nextServiceDue":{"type":"string","maxLength":40},"runtimeHours":{"type":"number","minimum":0,"maximum":1000000000},"faultCount":{"type":"number","minimum":0,"maximum":1000000},"efficiency":{"type":"number","minimum":0,"maximum":1000000},"ratedEfficiency":{"type":"number","minimum":0,"maximum":1000000},"supplyTemp":{"type":"number","minimum":-100,"maximum":200},"returnTemp":{"type":"number","minimum":-100,"maximum":200},"setpoint":{"type":"number","minimum":-100,"maximum":200}},"additionalProperties":false}},"occupancy":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"periodStart":{"type":"string","maxLength":40},"periodEnd":{"type":"string","maxLength":40},"occupants":{"type":"number","minimum":0,"maximum":1000000},"hoursOccupied":{"type":"number","minimum":0,"maximum":1000000}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"meters":[{"id":"M-1","buildingId":"B-1","utility":"electric","unit":"kWh"}],"readings":[{"meterId":"M-1","at":"2026-10-01","value":0,"unit":"kWh","cumulative":true},{"meterId":"M-1","at":"2026-10-08","value":70,"unit":"kWh","cumulative":true},{"meterId":"M-1","at":"2026-10-15","value":140,"unit":"kWh","cumulative":true},{"meterId":"M-1","at":"2026-10-22","value":210,"unit":"kWh","cumulative":true},{"meterId":"M-1","at":"2026-10-29","value":420,"unit":"kWh","cumulative":true}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"unusualCount":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"meterId":{"type":"string"},"buildingId":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"dailyQuantity":{"type":"number"},"baselineMean":{"type":"number"},"baselineMeanSupplied":{"type":"boolean"},"baselineMethod":{"type":"string"},"score":{"type":"number"},"scoreSupplied":{"type":"boolean"},"unusual":{"type":"boolean"},"explanation":{"type":"string"},"tariffInvented":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"}},"additionalProperties":true}},"tariffInvented":{"type":"boolean"},"performanceInvented":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"},"equipmentControlled":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"subject":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"detected","unusualCount":1,"items":[{"id":"AN-1","meterId":"M-1","buildingId":"","from":"2026-10-01","to":"2026-10-08","quantity":70,"unit":"kWh","dailyQuantity":10,"baselineMean":16.6667,"baselineMeanSupplied":true,"baselineMethod":"leave_one_out_mean_daily","score":-0.5774,"scoreSupplied":true,"unusual":false,"explanation":"Daily usage 10 kWh is within 2 standard deviations of leave-one-out baseline mean 16.6667 (leave_one_out_mean_daily).","tariffInvented":false,"savingsGuaranteed":false},{"id":"AN-2","meterId":"M-1","buildingId":"","from":"2026-10-08","to":"2026-10-15","quantity":70,"unit":"kWh","dailyQuantity":10,"baselineMean":16.6667,"baselineMeanSupplied":true,"baselineMethod":"leave_one_out_mean_daily","score":-0.5774,"scoreSupplied":true,"unusual":false,"explanation":"Daily usage 10 kWh is within 2 standard deviations of leave-one-out baseline mean 16.6667 (leave_one_out_mean_daily).","tariffInvented":false,"savingsGuaranteed":false},{"id":"AN-3","meterId":"M-1","buildingId":"","from":"2026-10-15","to":"2026-10-22","quantity":70,"unit":"kWh","dailyQuantity":10,"baselineMean":16.6667,"baselineMeanSupplied":true,"baselineMethod":"leave_one_out_mean_daily","score":-0.5774,"scoreSupplied":true,"unusual":false,"explanation":"Daily usage 10 kWh is within 2 standard deviations of leave-one-out baseline mean 16.6667 (leave_one_out_mean_daily).","tariffInvented":false,"savingsGuaranteed":false},{"id":"AN-4","meterId":"M-1","buildingId":"","from":"2026-10-22","to":"2026-10-29","quantity":210,"unit":"kWh","dailyQuantity":30,"baselineMean":10,"baselineMeanSupplied":true,"baselineMethod":"leave_one_out_mean_daily","score":3,"scoreSupplied":true,"unusual":true,"explanation":"Daily usage 30 kWh is outside 50–150% of leave-one-out baseline mean 10 (leave_one_out_mean_daily; stdev unavailable).","tariffInvented":false,"savingsGuaranteed":false}],"tariffInvented":false,"performanceInvented":false,"savingsGuaranteed":false,"equipmentControlled":false,"findings":[{"kind":"observation","code":"usage_anomaly","subject":"M-1","detail":"Daily usage 30 kWh is outside 50–150% of leave-one-out baseline mean 10 (leave_one_out_mean_daily; stdev unavailable)."}],"limitations":["Meter readings, bills, tariffs, equipment records, and occupancy rows are copied only from labeled fields supplied by the caller.","Consumption and cost use supplied units and tariffs only. Missing tariffs are not invented.","Unusual usage is compared against a baseline calculated from supplied readings for the same meter or utility.","Buildings are compared only when measurement periods and units are compatible.","Equipment performance and savings are never invented. HVAC and connected equipment are never controlled."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]}}},"/api/v1/building-energy/hvac-performance-analyze":{"post":{"operationId":"analyze_hvac_performance","summary":"Analyze HVAC performance","description":"Compare supplied HVAC efficiency and temperature readings with rated values. Equipment is never controlled and performance is not invented.","tags":["building-energy"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"buildings":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"area":{"type":"number","minimum":0,"maximum":1000000000},"areaUnit":{"type":"string","maxLength":40}},"additionalProperties":false}},"meters":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"utility":{"type":"string","maxLength":80},"unit":{"type":"string","maxLength":40}},"additionalProperties":false}},"readings":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"meterId":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"at":{"type":"string","maxLength":40},"value":{"type":"number","minimum":0,"maximum":1000000000},"unit":{"type":"string","maxLength":40},"cumulative":{"type":"boolean"}},"additionalProperties":false}},"tariffs":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"utility":{"type":"string","maxLength":80},"unit":{"type":"string","maxLength":40},"rate":{"type":"number","minimum":0,"maximum":1000000},"fixedCharge":{"type":"number","minimum":0,"maximum":1000000000},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false}},"bills":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"utility":{"type":"string","maxLength":80},"periodStart":{"type":"string","maxLength":40},"periodEnd":{"type":"string","maxLength":40},"quantity":{"type":"number","minimum":0,"maximum":1000000000},"unit":{"type":"string","maxLength":40},"cost":{"type":"number","minimum":0,"maximum":1000000000}},"additionalProperties":false}},"equipment":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"type":{"type":"string","maxLength":80},"ratedCapacity":{"type":"number","minimum":0,"maximum":1000000000},"capacityUnit":{"type":"string","maxLength":40},"installedAt":{"type":"string","maxLength":40},"lastServiceAt":{"type":"string","maxLength":40},"nextServiceDue":{"type":"string","maxLength":40},"runtimeHours":{"type":"number","minimum":0,"maximum":1000000000},"faultCount":{"type":"number","minimum":0,"maximum":1000000},"efficiency":{"type":"number","minimum":0,"maximum":1000000},"ratedEfficiency":{"type":"number","minimum":0,"maximum":1000000},"supplyTemp":{"type":"number","minimum":-100,"maximum":200},"returnTemp":{"type":"number","minimum":-100,"maximum":200},"setpoint":{"type":"number","minimum":-100,"maximum":200}},"additionalProperties":false}},"occupancy":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"periodStart":{"type":"string","maxLength":40},"periodEnd":{"type":"string","maxLength":40},"occupants":{"type":"number","minimum":0,"maximum":1000000},"hoursOccupied":{"type":"number","minimum":0,"maximum":1000000}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"equipment":[{"id":"EQ-1","buildingId":"B-1","name":"AHU-1","type":"hvac","efficiency":2.8,"ratedEfficiency":3.5,"supplyTemp":14,"returnTemp":14.5,"setpoint":12,"runtimeHours":9000},{"id":"EQ-2","buildingId":"B-1","name":"Chiller-1","type":"chiller","efficiency":5.1,"ratedEfficiency":5.2,"supplyTemp":7,"returnTemp":12,"setpoint":7}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"flagCount":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"ratedCapacity":{"type":"number"},"ratedCapacitySupplied":{"type":"boolean"},"capacityUnit":{"type":"string"},"efficiency":{"type":"number"},"efficiencySupplied":{"type":"boolean"},"ratedEfficiency":{"type":"number"},"ratedEfficiencySupplied":{"type":"boolean"},"efficiencyRatio":{"type":"number"},"efficiencyRatioSupplied":{"type":"boolean"},"supplyTemp":{"type":"number"},"supplyTempSupplied":{"type":"boolean"},"returnTemp":{"type":"number"},"returnTempSupplied":{"type":"boolean"},"setpoint":{"type":"number"},"setpointSupplied":{"type":"boolean"},"tempDelta":{"type":"number"},"tempDeltaSupplied":{"type":"boolean"},"setpointGap":{"type":"number"},"setpointGapSupplied":{"type":"boolean"},"runtimeHours":{"type":"number"},"runtimeHoursSupplied":{"type":"boolean"},"flags":{"type":"array","items":{"type":"string"}},"performanceInvented":{"type":"boolean"},"equipmentControlled":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"}},"additionalProperties":true}},"tariffInvented":{"type":"boolean"},"performanceInvented":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"},"equipmentControlled":{"type":"boolean"},"findings":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"analyzed","flagCount":1,"items":[{"id":"EQ-1","buildingId":"B-1","name":"AHU-1","type":"hvac","ratedCapacity":0,"ratedCapacitySupplied":false,"capacityUnit":"","efficiency":2.8,"efficiencySupplied":true,"ratedEfficiency":3.5,"ratedEfficiencySupplied":true,"efficiencyRatio":0.8,"efficiencyRatioSupplied":true,"supplyTemp":14,"supplyTempSupplied":true,"returnTemp":14.5,"returnTempSupplied":true,"setpoint":12,"setpointSupplied":true,"tempDelta":0.5,"tempDeltaSupplied":true,"setpointGap":2,"setpointGapSupplied":true,"runtimeHours":9000,"runtimeHoursSupplied":true,"flags":["below_rated_efficiency","low_temp_delta"],"performanceInvented":false,"equipmentControlled":false,"savingsGuaranteed":false},{"id":"EQ-2","buildingId":"B-1","name":"Chiller-1","type":"chiller","ratedCapacity":0,"ratedCapacitySupplied":false,"capacityUnit":"","efficiency":5.1,"efficiencySupplied":true,"ratedEfficiency":5.2,"ratedEfficiencySupplied":true,"efficiencyRatio":0.9808,"efficiencyRatioSupplied":true,"supplyTemp":7,"supplyTempSupplied":true,"returnTemp":12,"returnTempSupplied":true,"setpoint":7,"setpointSupplied":true,"tempDelta":5,"tempDeltaSupplied":true,"setpointGap":0,"setpointGapSupplied":true,"runtimeHours":0,"runtimeHoursSupplied":false,"flags":[],"performanceInvented":false,"equipmentControlled":false,"savingsGuaranteed":false}],"tariffInvented":false,"performanceInvented":false,"savingsGuaranteed":false,"equipmentControlled":false,"findings":[],"limitations":["Meter readings, bills, tariffs, equipment records, and occupancy rows are copied only from labeled fields supplied by the caller.","Consumption and cost use supplied units and tariffs only. Missing tariffs are not invented.","Unusual usage is compared against a baseline calculated from supplied readings for the same meter or utility.","Buildings are compared only when measurement periods and units are compatible.","Equipment performance and savings are never invented. HVAC and connected equipment are never controlled."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]}}},"/api/v1/building-energy/baseline-calculate":{"post":{"operationId":"calculate_building_energy_baseline","summary":"Calculate building energy baseline","description":"Calculate a mean daily-interval baseline and standard deviation from supplied meter readings for each meter.","tags":["building-energy"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"buildings":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"area":{"type":"number","minimum":0,"maximum":1000000000},"areaUnit":{"type":"string","maxLength":40}},"additionalProperties":false}},"meters":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"utility":{"type":"string","maxLength":80},"unit":{"type":"string","maxLength":40}},"additionalProperties":false}},"readings":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"meterId":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"at":{"type":"string","maxLength":40},"value":{"type":"number","minimum":0,"maximum":1000000000},"unit":{"type":"string","maxLength":40},"cumulative":{"type":"boolean"}},"additionalProperties":false}},"tariffs":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"utility":{"type":"string","maxLength":80},"unit":{"type":"string","maxLength":40},"rate":{"type":"number","minimum":0,"maximum":1000000},"fixedCharge":{"type":"number","minimum":0,"maximum":1000000000},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false}},"bills":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"utility":{"type":"string","maxLength":80},"periodStart":{"type":"string","maxLength":40},"periodEnd":{"type":"string","maxLength":40},"quantity":{"type":"number","minimum":0,"maximum":1000000000},"unit":{"type":"string","maxLength":40},"cost":{"type":"number","minimum":0,"maximum":1000000000}},"additionalProperties":false}},"equipment":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"type":{"type":"string","maxLength":80},"ratedCapacity":{"type":"number","minimum":0,"maximum":1000000000},"capacityUnit":{"type":"string","maxLength":40},"installedAt":{"type":"string","maxLength":40},"lastServiceAt":{"type":"string","maxLength":40},"nextServiceDue":{"type":"string","maxLength":40},"runtimeHours":{"type":"number","minimum":0,"maximum":1000000000},"faultCount":{"type":"number","minimum":0,"maximum":1000000},"efficiency":{"type":"number","minimum":0,"maximum":1000000},"ratedEfficiency":{"type":"number","minimum":0,"maximum":1000000},"supplyTemp":{"type":"number","minimum":-100,"maximum":200},"returnTemp":{"type":"number","minimum":-100,"maximum":200},"setpoint":{"type":"number","minimum":-100,"maximum":200}},"additionalProperties":false}},"occupancy":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"periodStart":{"type":"string","maxLength":40},"periodEnd":{"type":"string","maxLength":40},"occupants":{"type":"number","minimum":0,"maximum":1000000},"hoursOccupied":{"type":"number","minimum":0,"maximum":1000000}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"meters":[{"id":"M-1","buildingId":"B-1","utility":"electric","unit":"kWh"}],"readings":[{"meterId":"M-1","at":"2026-10-01","value":0,"unit":"kWh","cumulative":true},{"meterId":"M-1","at":"2026-10-08","value":70,"unit":"kWh","cumulative":true},{"meterId":"M-1","at":"2026-10-15","value":140,"unit":"kWh","cumulative":true},{"meterId":"M-1","at":"2026-10-22","value":210,"unit":"kWh","cumulative":true}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"meterId":{"type":"string"},"buildingId":{"type":"string"},"utility":{"type":"string"},"unit":{"type":"string"},"sampleCount":{"type":"number"},"baselineMean":{"type":"number"},"baselineMeanSupplied":{"type":"boolean"},"baselineStdev":{"type":"number"},"baselineStdevSupplied":{"type":"boolean"},"baselineMethod":{"type":"string"},"comparisonUnit":{"type":"string"},"tariffInvented":{"type":"boolean"},"performanceInvented":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"}},"additionalProperties":true}},"tariffInvented":{"type":"boolean"},"performanceInvented":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"},"equipmentControlled":{"type":"boolean"},"findings":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"calculated","items":[{"meterId":"M-1","buildingId":"B-1","utility":"electric","unit":"kWh","sampleCount":3,"baselineMean":10,"baselineMeanSupplied":true,"baselineStdev":0,"baselineStdevSupplied":true,"baselineMethod":"mean_daily_interval","comparisonUnit":"kWh","tariffInvented":false,"performanceInvented":false,"savingsGuaranteed":false}],"tariffInvented":false,"performanceInvented":false,"savingsGuaranteed":false,"equipmentControlled":false,"findings":[],"limitations":["Meter readings, bills, tariffs, equipment records, and occupancy rows are copied only from labeled fields supplied by the caller.","Consumption and cost use supplied units and tariffs only. Missing tariffs are not invented.","Unusual usage is compared against a baseline calculated from supplied readings for the same meter or utility.","Buildings are compared only when measurement periods and units are compatible.","Equipment performance and savings are never invented. HVAC and connected equipment are never controlled."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/building-energy/cost-variance-detect":{"post":{"operationId":"detect_energy_cost_variance","summary":"Detect energy cost variance","description":"Compare billed costs with expected cost from supplied tariffs and quantities. Tariffs are never invented.","tags":["building-energy"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"buildings":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"area":{"type":"number","minimum":0,"maximum":1000000000},"areaUnit":{"type":"string","maxLength":40}},"additionalProperties":false}},"meters":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"utility":{"type":"string","maxLength":80},"unit":{"type":"string","maxLength":40}},"additionalProperties":false}},"readings":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"meterId":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"at":{"type":"string","maxLength":40},"value":{"type":"number","minimum":0,"maximum":1000000000},"unit":{"type":"string","maxLength":40},"cumulative":{"type":"boolean"}},"additionalProperties":false}},"tariffs":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"utility":{"type":"string","maxLength":80},"unit":{"type":"string","maxLength":40},"rate":{"type":"number","minimum":0,"maximum":1000000},"fixedCharge":{"type":"number","minimum":0,"maximum":1000000000},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false}},"bills":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"utility":{"type":"string","maxLength":80},"periodStart":{"type":"string","maxLength":40},"periodEnd":{"type":"string","maxLength":40},"quantity":{"type":"number","minimum":0,"maximum":1000000000},"unit":{"type":"string","maxLength":40},"cost":{"type":"number","minimum":0,"maximum":1000000000}},"additionalProperties":false}},"equipment":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"type":{"type":"string","maxLength":80},"ratedCapacity":{"type":"number","minimum":0,"maximum":1000000000},"capacityUnit":{"type":"string","maxLength":40},"installedAt":{"type":"string","maxLength":40},"lastServiceAt":{"type":"string","maxLength":40},"nextServiceDue":{"type":"string","maxLength":40},"runtimeHours":{"type":"number","minimum":0,"maximum":1000000000},"faultCount":{"type":"number","minimum":0,"maximum":1000000},"efficiency":{"type":"number","minimum":0,"maximum":1000000},"ratedEfficiency":{"type":"number","minimum":0,"maximum":1000000},"supplyTemp":{"type":"number","minimum":-100,"maximum":200},"returnTemp":{"type":"number","minimum":-100,"maximum":200},"setpoint":{"type":"number","minimum":-100,"maximum":200}},"additionalProperties":false}},"occupancy":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"periodStart":{"type":"string","maxLength":40},"periodEnd":{"type":"string","maxLength":40},"occupants":{"type":"number","minimum":0,"maximum":1000000},"hoursOccupied":{"type":"number","minimum":0,"maximum":1000000}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"tariffs":[{"id":"T-1","utility":"electric","unit":"kWh","rate":0.1,"fixedCharge":20,"asOf":"2026-11-01"}],"bills":[{"id":"BILL-1","buildingId":"B-1","utility":"electric","periodStart":"2026-10-01","periodEnd":"2026-10-31","quantity":1000,"unit":"kWh","cost":150},{"id":"BILL-2","buildingId":"B-1","utility":"electric","periodStart":"2026-09-01","periodEnd":"2026-09-30","quantity":900,"unit":"kWh","cost":110}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"varianceCount":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"billId":{"type":"string"},"buildingId":{"type":"string"},"utility":{"type":"string"},"periodStart":{"type":"string"},"periodEnd":{"type":"string"},"quantity":{"type":"number"},"quantitySupplied":{"type":"boolean"},"unit":{"type":"string"},"actualCost":{"type":"number"},"actualCostSupplied":{"type":"boolean"},"expectedCost":{"type":"number"},"expectedCostSupplied":{"type":"boolean"},"variance":{"type":"number"},"varianceSupplied":{"type":"boolean"},"variancePct":{"type":"number"},"variancePctSupplied":{"type":"boolean"},"tariffId":{"type":"string"},"tariffRate":{"type":"number"},"tariffRateSupplied":{"type":"boolean"},"tariffInvented":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"}},"additionalProperties":true}},"tariffInvented":{"type":"boolean"},"performanceInvented":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"},"equipmentControlled":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"subject":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"detected","varianceCount":1,"items":[{"billId":"BILL-1","buildingId":"B-1","utility":"electric","periodStart":"2026-10-01","periodEnd":"2026-10-31","quantity":1000,"quantitySupplied":true,"unit":"kWh","actualCost":150,"actualCostSupplied":true,"expectedCost":120,"expectedCostSupplied":true,"variance":30,"varianceSupplied":true,"variancePct":0.25,"variancePctSupplied":true,"tariffId":"T-1","tariffRate":0.1,"tariffRateSupplied":true,"tariffInvented":false,"savingsGuaranteed":false},{"billId":"BILL-2","buildingId":"B-1","utility":"electric","periodStart":"2026-09-01","periodEnd":"2026-09-30","quantity":900,"quantitySupplied":true,"unit":"kWh","actualCost":110,"actualCostSupplied":true,"expectedCost":110,"expectedCostSupplied":true,"variance":0,"varianceSupplied":true,"variancePct":0,"variancePctSupplied":true,"tariffId":"T-1","tariffRate":0.1,"tariffRateSupplied":true,"tariffInvented":false,"savingsGuaranteed":false}],"tariffInvented":false,"performanceInvented":false,"savingsGuaranteed":false,"equipmentControlled":false,"findings":[{"kind":"observation","code":"cost_variance","subject":"BILL-1","detail":"Billed cost differs from tariff-based expected cost by 25%."}],"limitations":["Meter readings, bills, tariffs, equipment records, and occupancy rows are copied only from labeled fields supplied by the caller.","Consumption and cost use supplied units and tariffs only. Missing tariffs are not invented.","Unusual usage is compared against a baseline calculated from supplied readings for the same meter or utility.","Buildings are compared only when measurement periods and units are compatible.","Equipment performance and savings are never invented. HVAC and connected equipment are never controlled."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/building-energy/equipment-maintenance-priority":{"post":{"operationId":"prioritize_equipment_maintenance","summary":"Prioritize equipment maintenance","description":"Rank equipment using supplied service due dates, fault counts, efficiency, and runtime. Connected equipment is never controlled.","tags":["building-energy"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"buildings":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"area":{"type":"number","minimum":0,"maximum":1000000000},"areaUnit":{"type":"string","maxLength":40}},"additionalProperties":false}},"meters":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"utility":{"type":"string","maxLength":80},"unit":{"type":"string","maxLength":40}},"additionalProperties":false}},"readings":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"meterId":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"at":{"type":"string","maxLength":40},"value":{"type":"number","minimum":0,"maximum":1000000000},"unit":{"type":"string","maxLength":40},"cumulative":{"type":"boolean"}},"additionalProperties":false}},"tariffs":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"utility":{"type":"string","maxLength":80},"unit":{"type":"string","maxLength":40},"rate":{"type":"number","minimum":0,"maximum":1000000},"fixedCharge":{"type":"number","minimum":0,"maximum":1000000000},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false}},"bills":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"utility":{"type":"string","maxLength":80},"periodStart":{"type":"string","maxLength":40},"periodEnd":{"type":"string","maxLength":40},"quantity":{"type":"number","minimum":0,"maximum":1000000000},"unit":{"type":"string","maxLength":40},"cost":{"type":"number","minimum":0,"maximum":1000000000}},"additionalProperties":false}},"equipment":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"type":{"type":"string","maxLength":80},"ratedCapacity":{"type":"number","minimum":0,"maximum":1000000000},"capacityUnit":{"type":"string","maxLength":40},"installedAt":{"type":"string","maxLength":40},"lastServiceAt":{"type":"string","maxLength":40},"nextServiceDue":{"type":"string","maxLength":40},"runtimeHours":{"type":"number","minimum":0,"maximum":1000000000},"faultCount":{"type":"number","minimum":0,"maximum":1000000},"efficiency":{"type":"number","minimum":0,"maximum":1000000},"ratedEfficiency":{"type":"number","minimum":0,"maximum":1000000},"supplyTemp":{"type":"number","minimum":-100,"maximum":200},"returnTemp":{"type":"number","minimum":-100,"maximum":200},"setpoint":{"type":"number","minimum":-100,"maximum":200}},"additionalProperties":false}},"occupancy":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"periodStart":{"type":"string","maxLength":40},"periodEnd":{"type":"string","maxLength":40},"occupants":{"type":"number","minimum":0,"maximum":1000000},"hoursOccupied":{"type":"number","minimum":0,"maximum":1000000}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"asOf":"2026-11-10","equipment":[{"id":"EQ-1","buildingId":"B-1","name":"AHU-1","type":"hvac","lastServiceAt":"2025-01-01","nextServiceDue":"2026-10-01","faultCount":4,"efficiency":2.5,"ratedEfficiency":3.5,"runtimeHours":9500},{"id":"EQ-2","buildingId":"B-1","name":"Pump-1","type":"pump","lastServiceAt":"2026-09-01","nextServiceDue":"2027-01-01","faultCount":0,"runtimeHours":1000}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"highCount":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"lastServiceAt":{"type":"string"},"nextServiceDue":{"type":"string"},"overdueDays":{"type":"number"},"overdueDaysSupplied":{"type":"boolean"},"daysSinceService":{"type":"number"},"daysSinceServiceSupplied":{"type":"boolean"},"faultCount":{"type":"number"},"faultCountSupplied":{"type":"boolean"},"runtimeHours":{"type":"number"},"runtimeHoursSupplied":{"type":"boolean"},"score":{"type":"number"},"priority":{"type":"string"},"reasons":{"type":"array","items":{"type":"string"}},"performanceInvented":{"type":"boolean"},"equipmentControlled":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"},"rank":{"type":"number"}},"additionalProperties":true}},"tariffInvented":{"type":"boolean"},"performanceInvented":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"},"equipmentControlled":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"subject":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"prioritized","highCount":1,"items":[{"id":"EQ-1","buildingId":"B-1","name":"AHU-1","type":"hvac","lastServiceAt":"2025-01-01","nextServiceDue":"2026-10-01","overdueDays":40,"overdueDaysSupplied":true,"daysSinceService":678,"daysSinceServiceSupplied":true,"faultCount":4,"faultCountSupplied":true,"runtimeHours":9500,"runtimeHoursSupplied":true,"score":90,"priority":"high","reasons":["service overdue by 40 days against supplied due date","4 supplied fault count","measured efficiency below 90% of rated efficiency","runtime hours at or above 8000"],"performanceInvented":false,"equipmentControlled":false,"savingsGuaranteed":false,"rank":1},{"id":"EQ-2","buildingId":"B-1","name":"Pump-1","type":"pump","lastServiceAt":"2026-09-01","nextServiceDue":"2027-01-01","overdueDays":0,"overdueDaysSupplied":false,"daysSinceService":70,"daysSinceServiceSupplied":true,"faultCount":0,"faultCountSupplied":true,"runtimeHours":1000,"runtimeHoursSupplied":true,"score":0,"priority":"low","reasons":[],"performanceInvented":false,"equipmentControlled":false,"savingsGuaranteed":false,"rank":2}],"tariffInvented":false,"performanceInvented":false,"savingsGuaranteed":false,"equipmentControlled":false,"findings":[{"kind":"observation","code":"no_priority_signal","subject":"EQ-2","detail":"No overdue service, faults, efficiency drop, or high runtime was present in supplied fields."}],"limitations":["Meter readings, bills, tariffs, equipment records, and occupancy rows are copied only from labeled fields supplied by the caller.","Consumption and cost use supplied units and tariffs only. Missing tariffs are not invented.","Unusual usage is compared against a baseline calculated from supplied readings for the same meter or utility.","Buildings are compared only when measurement periods and units are compatible.","Equipment performance and savings are never invented. HVAC and connected equipment are never controlled."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/building-energy/occupancy-compare":{"post":{"operationId":"compare_occupancy_and_energy","summary":"Compare occupancy and energy","description":"Compare buildings only when supplied measurement periods and energy units are compatible, optionally normalizing by occupants.","tags":["building-energy"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"buildings":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"area":{"type":"number","minimum":0,"maximum":1000000000},"areaUnit":{"type":"string","maxLength":40}},"additionalProperties":false}},"meters":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"utility":{"type":"string","maxLength":80},"unit":{"type":"string","maxLength":40}},"additionalProperties":false}},"readings":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"meterId":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"at":{"type":"string","maxLength":40},"value":{"type":"number","minimum":0,"maximum":1000000000},"unit":{"type":"string","maxLength":40},"cumulative":{"type":"boolean"}},"additionalProperties":false}},"tariffs":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"utility":{"type":"string","maxLength":80},"unit":{"type":"string","maxLength":40},"rate":{"type":"number","minimum":0,"maximum":1000000},"fixedCharge":{"type":"number","minimum":0,"maximum":1000000000},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false}},"bills":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"utility":{"type":"string","maxLength":80},"periodStart":{"type":"string","maxLength":40},"periodEnd":{"type":"string","maxLength":40},"quantity":{"type":"number","minimum":0,"maximum":1000000000},"unit":{"type":"string","maxLength":40},"cost":{"type":"number","minimum":0,"maximum":1000000000}},"additionalProperties":false}},"equipment":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"type":{"type":"string","maxLength":80},"ratedCapacity":{"type":"number","minimum":0,"maximum":1000000000},"capacityUnit":{"type":"string","maxLength":40},"installedAt":{"type":"string","maxLength":40},"lastServiceAt":{"type":"string","maxLength":40},"nextServiceDue":{"type":"string","maxLength":40},"runtimeHours":{"type":"number","minimum":0,"maximum":1000000000},"faultCount":{"type":"number","minimum":0,"maximum":1000000},"efficiency":{"type":"number","minimum":0,"maximum":1000000},"ratedEfficiency":{"type":"number","minimum":0,"maximum":1000000},"supplyTemp":{"type":"number","minimum":-100,"maximum":200},"returnTemp":{"type":"number","minimum":-100,"maximum":200},"setpoint":{"type":"number","minimum":-100,"maximum":200}},"additionalProperties":false}},"occupancy":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"periodStart":{"type":"string","maxLength":40},"periodEnd":{"type":"string","maxLength":40},"occupants":{"type":"number","minimum":0,"maximum":1000000},"hoursOccupied":{"type":"number","minimum":0,"maximum":1000000}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"buildings":[{"id":"B-1","name":"Tower A"},{"id":"B-2","name":"Tower B"}],"meters":[{"id":"M-1","buildingId":"B-1","utility":"electric","unit":"kWh"},{"id":"M-2","buildingId":"B-2","utility":"electric","unit":"kWh"}],"readings":[{"meterId":"M-1","buildingId":"B-1","at":"2026-11-01","value":0,"unit":"kWh","cumulative":true},{"meterId":"M-1","buildingId":"B-1","at":"2026-11-08","value":200,"unit":"kWh","cumulative":true},{"meterId":"M-2","buildingId":"B-2","at":"2026-11-01","value":0,"unit":"kWh","cumulative":true},{"meterId":"M-2","buildingId":"B-2","at":"2026-11-08","value":120,"unit":"kWh","cumulative":true}],"occupancy":[{"buildingId":"B-1","periodStart":"2026-11-01","periodEnd":"2026-11-08","occupants":100},{"buildingId":"B-2","periodStart":"2026-11-01","periodEnd":"2026-11-08","occupants":80}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"compatibleCount":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"leftBuildingId":{"type":"string"},"rightBuildingId":{"type":"string"},"periodStart":{"type":"string"},"periodEnd":{"type":"string"},"unit":{"type":"string"},"leftQuantity":{"type":"number"},"rightQuantity":{"type":"number"},"leftOccupants":{"type":"number"},"rightOccupants":{"type":"number"},"leftPerOccupant":{"type":"number"},"rightPerOccupant":{"type":"number"},"leftPerOccupantSupplied":{"type":"boolean"},"rightPerOccupantSupplied":{"type":"boolean"},"compatible":{"type":"boolean"},"reason":{"type":"string"},"savingsGuaranteed":{"type":"boolean"},"tariffInvented":{"type":"boolean"}},"additionalProperties":true}},"tariffInvented":{"type":"boolean"},"performanceInvented":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"},"equipmentControlled":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"subject":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"compared","compatibleCount":1,"items":[{"leftBuildingId":"B-1","rightBuildingId":"B-2","periodStart":"2026-11-01","periodEnd":"2026-11-08","unit":"kWh","leftQuantity":200,"rightQuantity":120,"leftOccupants":100,"rightOccupants":80,"leftPerOccupant":2,"rightPerOccupant":1.5,"leftPerOccupantSupplied":true,"rightPerOccupantSupplied":true,"compatible":true,"reason":"Compared because overlapping/matching periods and compatible energy units were supplied.","savingsGuaranteed":false,"tariffInvented":false}],"tariffInvented":false,"performanceInvented":false,"savingsGuaranteed":false,"equipmentControlled":false,"findings":[{"kind":"missing","code":"tariff","subject":"M-1","detail":"No supplied tariff matched this meter utility/unit, so cost was not calculated."},{"kind":"missing","code":"tariff","subject":"M-2","detail":"No supplied tariff matched this meter utility/unit, so cost was not calculated."}],"limitations":["Meter readings, bills, tariffs, equipment records, and occupancy rows are copied only from labeled fields supplied by the caller.","Consumption and cost use supplied units and tariffs only. Missing tariffs are not invented.","Unusual usage is compared against a baseline calculated from supplied readings for the same meter or utility.","Buildings are compared only when measurement periods and units are compatible.","Equipment performance and savings are never invented. HVAC and connected equipment are never controlled."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]}}},"/api/v1/building-energy/efficiency-report":{"post":{"operationId":"report_building_energy_efficiency","summary":"Report building energy efficiency","description":"Combine consumption, anomalies, HVAC flags, baselines, cost variance, maintenance priorities, and occupancy comparisons from supplied facility records.","tags":["building-energy"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"csv":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/plain","text/csv","application/json"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"buildings":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"area":{"type":"number","minimum":0,"maximum":1000000000},"areaUnit":{"type":"string","maxLength":40}},"additionalProperties":false}},"meters":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"utility":{"type":"string","maxLength":80},"unit":{"type":"string","maxLength":40}},"additionalProperties":false}},"readings":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"meterId":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"at":{"type":"string","maxLength":40},"value":{"type":"number","minimum":0,"maximum":1000000000},"unit":{"type":"string","maxLength":40},"cumulative":{"type":"boolean"}},"additionalProperties":false}},"tariffs":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"utility":{"type":"string","maxLength":80},"unit":{"type":"string","maxLength":40},"rate":{"type":"number","minimum":0,"maximum":1000000},"fixedCharge":{"type":"number","minimum":0,"maximum":1000000000},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false}},"bills":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"utility":{"type":"string","maxLength":80},"periodStart":{"type":"string","maxLength":40},"periodEnd":{"type":"string","maxLength":40},"quantity":{"type":"number","minimum":0,"maximum":1000000000},"unit":{"type":"string","maxLength":40},"cost":{"type":"number","minimum":0,"maximum":1000000000}},"additionalProperties":false}},"equipment":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":200},"type":{"type":"string","maxLength":80},"ratedCapacity":{"type":"number","minimum":0,"maximum":1000000000},"capacityUnit":{"type":"string","maxLength":40},"installedAt":{"type":"string","maxLength":40},"lastServiceAt":{"type":"string","maxLength":40},"nextServiceDue":{"type":"string","maxLength":40},"runtimeHours":{"type":"number","minimum":0,"maximum":1000000000},"faultCount":{"type":"number","minimum":0,"maximum":1000000},"efficiency":{"type":"number","minimum":0,"maximum":1000000},"ratedEfficiency":{"type":"number","minimum":0,"maximum":1000000},"supplyTemp":{"type":"number","minimum":-100,"maximum":200},"returnTemp":{"type":"number","minimum":-100,"maximum":200},"setpoint":{"type":"number","minimum":-100,"maximum":200}},"additionalProperties":false}},"occupancy":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"buildingId":{"type":"string","maxLength":80},"periodStart":{"type":"string","maxLength":40},"periodEnd":{"type":"string","maxLength":40},"occupants":{"type":"number","minimum":0,"maximum":1000000},"hoursOccupied":{"type":"number","minimum":0,"maximum":1000000}},"additionalProperties":false}},"asOf":{"type":"string","maxLength":40}},"additionalProperties":false},"example":{"asOf":"2026-11-10","buildings":[{"id":"B-1","name":"Tower A"},{"id":"B-2","name":"Tower B"}],"meters":[{"id":"M-1","buildingId":"B-1","utility":"electric","unit":"kWh"},{"id":"M-2","buildingId":"B-2","utility":"electric","unit":"kWh"}],"readings":[{"meterId":"M-1","buildingId":"B-1","at":"2026-10-01","value":0,"unit":"kWh","cumulative":true},{"meterId":"M-1","buildingId":"B-1","at":"2026-10-08","value":70,"unit":"kWh","cumulative":true},{"meterId":"M-1","buildingId":"B-1","at":"2026-10-15","value":140,"unit":"kWh","cumulative":true},{"meterId":"M-1","buildingId":"B-1","at":"2026-10-22","value":210,"unit":"kWh","cumulative":true},{"meterId":"M-1","buildingId":"B-1","at":"2026-10-29","value":420,"unit":"kWh","cumulative":true},{"meterId":"M-2","buildingId":"B-2","at":"2026-10-01","value":0,"unit":"kWh","cumulative":true},{"meterId":"M-2","buildingId":"B-2","at":"2026-10-08","value":50,"unit":"kWh","cumulative":true}],"tariffs":[{"id":"T-1","utility":"electric","unit":"kWh","rate":0.1,"fixedCharge":20}],"bills":[{"id":"BILL-1","buildingId":"B-1","utility":"electric","periodStart":"2026-10-01","periodEnd":"2026-10-31","quantity":1000,"unit":"kWh","cost":150}],"equipment":[{"id":"EQ-1","buildingId":"B-1","name":"AHU-1","type":"hvac","nextServiceDue":"2026-10-01","faultCount":3,"efficiency":2.5,"ratedEfficiency":3.5,"supplyTemp":14,"returnTemp":14.2,"setpoint":12,"runtimeHours":9000}],"occupancy":[{"buildingId":"B-1","periodStart":"2026-10-01","periodEnd":"2026-10-08","occupants":100},{"buildingId":"B-2","periodStart":"2026-10-01","periodEnd":"2026-10-08","occupants":80}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string"},"asOf":{"type":"string"},"meterCount":{"type":"number"},"readingCount":{"type":"number"},"unusualCount":{"type":"number"},"hvacFlagCount":{"type":"number"},"costVarianceCount":{"type":"number"},"highMaintenanceCount":{"type":"number"},"compatibleCompareCount":{"type":"number"},"consumption":{"type":"array","items":{"type":"object","properties":{"meterId":{"type":"string"},"buildingId":{"type":"string"},"utility":{"type":"string"},"unit":{"type":"string"},"intervalCount":{"type":"number"},"totalQuantity":{"type":"number"},"totalQuantitySupplied":{"type":"boolean"},"daySpan":{"type":"number"},"daySpanSupplied":{"type":"boolean"},"averagePerDay":{"type":"number"},"averagePerDaySupplied":{"type":"boolean"},"cost":{"type":"number"},"costSupplied":{"type":"boolean"},"tariffId":{"type":"string"},"tariffInvented":{"type":"boolean"},"periodStart":{"type":"string"},"periodEnd":{"type":"string"}},"additionalProperties":true}},"anomalies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"meterId":{"type":"string"},"buildingId":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"dailyQuantity":{"type":"number"},"baselineMean":{"type":"number"},"baselineMeanSupplied":{"type":"boolean"},"baselineMethod":{"type":"string"},"score":{"type":"number"},"scoreSupplied":{"type":"boolean"},"unusual":{"type":"boolean"},"explanation":{"type":"string"},"tariffInvented":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"}},"additionalProperties":true}},"hvac":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"ratedCapacity":{"type":"number"},"ratedCapacitySupplied":{"type":"boolean"},"capacityUnit":{"type":"string"},"efficiency":{"type":"number"},"efficiencySupplied":{"type":"boolean"},"ratedEfficiency":{"type":"number"},"ratedEfficiencySupplied":{"type":"boolean"},"efficiencyRatio":{"type":"number"},"efficiencyRatioSupplied":{"type":"boolean"},"supplyTemp":{"type":"number"},"supplyTempSupplied":{"type":"boolean"},"returnTemp":{"type":"number"},"returnTempSupplied":{"type":"boolean"},"setpoint":{"type":"number"},"setpointSupplied":{"type":"boolean"},"tempDelta":{"type":"number"},"tempDeltaSupplied":{"type":"boolean"},"setpointGap":{"type":"number"},"setpointGapSupplied":{"type":"boolean"},"runtimeHours":{"type":"number"},"runtimeHoursSupplied":{"type":"boolean"},"flags":{"type":"array","items":{"type":"string"}},"performanceInvented":{"type":"boolean"},"equipmentControlled":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"}},"additionalProperties":true}},"baselines":{"type":"array","items":{"type":"object","properties":{"meterId":{"type":"string"},"buildingId":{"type":"string"},"utility":{"type":"string"},"unit":{"type":"string"},"sampleCount":{"type":"number"},"baselineMean":{"type":"number"},"baselineMeanSupplied":{"type":"boolean"},"baselineStdev":{"type":"number"},"baselineStdevSupplied":{"type":"boolean"},"baselineMethod":{"type":"string"},"comparisonUnit":{"type":"string"},"tariffInvented":{"type":"boolean"},"performanceInvented":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"}},"additionalProperties":true}},"costVariance":{"type":"array","items":{"type":"object","properties":{"billId":{"type":"string"},"buildingId":{"type":"string"},"utility":{"type":"string"},"periodStart":{"type":"string"},"periodEnd":{"type":"string"},"quantity":{"type":"number"},"quantitySupplied":{"type":"boolean"},"unit":{"type":"string"},"actualCost":{"type":"number"},"actualCostSupplied":{"type":"boolean"},"expectedCost":{"type":"number"},"expectedCostSupplied":{"type":"boolean"},"variance":{"type":"number"},"varianceSupplied":{"type":"boolean"},"variancePct":{"type":"number"},"variancePctSupplied":{"type":"boolean"},"tariffId":{"type":"string"},"tariffRate":{"type":"number"},"tariffRateSupplied":{"type":"boolean"},"tariffInvented":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"}},"additionalProperties":true}},"maintenance":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"lastServiceAt":{"type":"string"},"nextServiceDue":{"type":"string"},"overdueDays":{"type":"number"},"overdueDaysSupplied":{"type":"boolean"},"daysSinceService":{"type":"number"},"daysSinceServiceSupplied":{"type":"boolean"},"faultCount":{"type":"number"},"faultCountSupplied":{"type":"boolean"},"runtimeHours":{"type":"number"},"runtimeHoursSupplied":{"type":"boolean"},"score":{"type":"number"},"priority":{"type":"string"},"reasons":{"type":"array","items":{"type":"string"}},"performanceInvented":{"type":"boolean"},"equipmentControlled":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"},"rank":{"type":"number"}},"additionalProperties":true}},"occupancyCompare":{"type":"array","items":{"type":"object","properties":{"leftBuildingId":{"type":"string"},"rightBuildingId":{"type":"string"},"periodStart":{"type":"string"},"periodEnd":{"type":"string"},"unit":{"type":"string"},"leftQuantity":{"type":"number"},"rightQuantity":{"type":"number"},"leftOccupants":{"type":"number"},"rightOccupants":{"type":"number"},"leftPerOccupant":{"type":"number"},"rightPerOccupant":{"type":"number"},"leftPerOccupantSupplied":{"type":"boolean"},"rightPerOccupantSupplied":{"type":"boolean"},"compatible":{"type":"boolean"},"reason":{"type":"string"},"savingsGuaranteed":{"type":"boolean"},"tariffInvented":{"type":"boolean"}},"additionalProperties":true}},"tariffInvented":{"type":"boolean"},"performanceInvented":{"type":"boolean"},"savingsGuaranteed":{"type":"boolean"},"equipmentControlled":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"subject":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-04T21:00:00.000Z","status":"reported","asOf":"2026-11-10","meterCount":2,"readingCount":7,"unusualCount":1,"hvacFlagCount":1,"costVarianceCount":1,"highMaintenanceCount":1,"compatibleCompareCount":1,"consumption":[{"meterId":"M-1","buildingId":"B-1","utility":"electric","unit":"kWh","intervalCount":4,"totalQuantity":420,"totalQuantitySupplied":true,"daySpan":28,"daySpanSupplied":true,"averagePerDay":15,"averagePerDaySupplied":true,"cost":62,"costSupplied":true,"tariffId":"T-1","tariffInvented":false,"periodStart":"2026-10-01","periodEnd":"2026-10-29"},{"meterId":"M-2","buildingId":"B-2","utility":"electric","unit":"kWh","intervalCount":1,"totalQuantity":50,"totalQuantitySupplied":true,"daySpan":7,"daySpanSupplied":true,"averagePerDay":7.1429,"averagePerDaySupplied":true,"cost":25,"costSupplied":true,"tariffId":"T-1","tariffInvented":false,"periodStart":"2026-10-01","periodEnd":"2026-10-08"}],"anomalies":[{"id":"AN-1","meterId":"M-1","buildingId":"B-1","from":"2026-10-01","to":"2026-10-08","quantity":70,"unit":"kWh","dailyQuantity":10,"baselineMean":16.6667,"baselineMeanSupplied":true,"baselineMethod":"leave_one_out_mean_daily","score":-0.5774,"scoreSupplied":true,"unusual":false,"explanation":"Daily usage 10 kWh is within 2 standard deviations of leave-one-out baseline mean 16.6667 (leave_one_out_mean_daily).","tariffInvented":false,"savingsGuaranteed":false},{"id":"AN-2","meterId":"M-1","buildingId":"B-1","from":"2026-10-08","to":"2026-10-15","quantity":70,"unit":"kWh","dailyQuantity":10,"baselineMean":16.6667,"baselineMeanSupplied":true,"baselineMethod":"leave_one_out_mean_daily","score":-0.5774,"scoreSupplied":true,"unusual":false,"explanation":"Daily usage 10 kWh is within 2 standard deviations of leave-one-out baseline mean 16.6667 (leave_one_out_mean_daily).","tariffInvented":false,"savingsGuaranteed":false},{"id":"AN-3","meterId":"M-1","buildingId":"B-1","from":"2026-10-15","to":"2026-10-22","quantity":70,"unit":"kWh","dailyQuantity":10,"baselineMean":16.6667,"baselineMeanSupplied":true,"baselineMethod":"leave_one_out_mean_daily","score":-0.5774,"scoreSupplied":true,"unusual":false,"explanation":"Daily usage 10 kWh is within 2 standard deviations of leave-one-out baseline mean 16.6667 (leave_one_out_mean_daily).","tariffInvented":false,"savingsGuaranteed":false},{"id":"AN-4","meterId":"M-1","buildingId":"B-1","from":"2026-10-22","to":"2026-10-29","quantity":210,"unit":"kWh","dailyQuantity":30,"baselineMean":10,"baselineMeanSupplied":true,"baselineMethod":"leave_one_out_mean_daily","score":3,"scoreSupplied":true,"unusual":true,"explanation":"Daily usage 30 kWh is outside 50–150% of leave-one-out baseline mean 10 (leave_one_out_mean_daily; stdev unavailable).","tariffInvented":false,"savingsGuaranteed":false},{"id":"AN-5","meterId":"M-2","buildingId":"B-2","from":"2026-10-01","to":"2026-10-08","quantity":50,"unit":"kWh","dailyQuantity":7.1429,"baselineMean":0,"baselineMeanSupplied":false,"baselineMethod":"none","score":0,"scoreSupplied":false,"unusual":false,"explanation":"No baseline was available for comparison.","tariffInvented":false,"savingsGuaranteed":false}],"hvac":[{"id":"EQ-1","buildingId":"B-1","name":"AHU-1","type":"hvac","ratedCapacity":0,"ratedCapacitySupplied":false,"capacityUnit":"","efficiency":2.5,"efficiencySupplied":true,"ratedEfficiency":3.5,"ratedEfficiencySupplied":true,"efficiencyRatio":0.7143,"efficiencyRatioSupplied":true,"supplyTemp":14,"supplyTempSupplied":true,"returnTemp":14.2,"returnTempSupplied":true,"setpoint":12,"setpointSupplied":true,"tempDelta":0.2,"tempDeltaSupplied":true,"setpointGap":2,"setpointGapSupplied":true,"runtimeHours":9000,"runtimeHoursSupplied":true,"flags":["below_rated_efficiency","low_temp_delta"],"performanceInvented":false,"equipmentControlled":false,"savingsGuaranteed":false}],"baselines":[{"meterId":"M-1","buildingId":"B-1","utility":"electric","unit":"kWh","sampleCount":4,"baselineMean":15,"baselineMeanSupplied":true,"baselineStdev":10,"baselineStdevSupplied":true,"baselineMethod":"mean_daily_interval","comparisonUnit":"kWh","tariffInvented":false,"performanceInvented":false,"savingsGuaranteed":false},{"meterId":"M-2","buildingId":"B-2","utility":"electric","unit":"kWh","sampleCount":1,"baselineMean":7.1429,"baselineMeanSupplied":true,"baselineStdev":0,"baselineStdevSupplied":false,"baselineMethod":"single_interval","comparisonUnit":"kWh","tariffInvented":false,"performanceInvented":false,"savingsGuaranteed":false}],"costVariance":[{"billId":"BILL-1","buildingId":"B-1","utility":"electric","periodStart":"2026-10-01","periodEnd":"2026-10-31","quantity":1000,"quantitySupplied":true,"unit":"kWh","actualCost":150,"actualCostSupplied":true,"expectedCost":120,"expectedCostSupplied":true,"variance":30,"varianceSupplied":true,"variancePct":0.25,"variancePctSupplied":true,"tariffId":"T-1","tariffRate":0.1,"tariffRateSupplied":true,"tariffInvented":false,"savingsGuaranteed":false}],"maintenance":[{"id":"EQ-1","buildingId":"B-1","name":"AHU-1","type":"hvac","lastServiceAt":"","nextServiceDue":"2026-10-01","overdueDays":40,"overdueDaysSupplied":true,"daysSinceService":0,"daysSinceServiceSupplied":false,"faultCount":3,"faultCountSupplied":true,"runtimeHours":9000,"runtimeHoursSupplied":true,"score":85,"priority":"high","reasons":["service overdue by 40 days against supplied due date","3 supplied fault count","measured efficiency below 90% of rated efficiency","runtime hours at or above 8000"],"performanceInvented":false,"equipmentControlled":false,"savingsGuaranteed":false,"rank":1}],"occupancyCompare":[{"leftBuildingId":"B-1","rightBuildingId":"B-2","periodStart":"2026-10-01","periodEnd":"2026-10-29","unit":"kWh","leftQuantity":420,"rightQuantity":50,"leftOccupants":100,"rightOccupants":80,"leftPerOccupant":4.2,"rightPerOccupant":0.625,"leftPerOccupantSupplied":true,"rightPerOccupantSupplied":true,"compatible":true,"reason":"Compared because overlapping/matching periods and compatible energy units were supplied.","savingsGuaranteed":false,"tariffInvented":false}],"tariffInvented":false,"performanceInvented":false,"savingsGuaranteed":false,"equipmentControlled":false,"findings":[{"kind":"observation","code":"usage_anomaly","subject":"M-1","detail":"Daily usage 30 kWh is outside 50–150% of leave-one-out baseline mean 10 (leave_one_out_mean_daily; stdev unavailable)."},{"kind":"missing","code":"baseline","subject":"M-2","detail":"An interval has no peer baseline for anomaly comparison."},{"kind":"observation","code":"thin_baseline","subject":"M-2","detail":"Fewer than two intervals were available. Baseline mean is labeled but variance is incomplete."},{"kind":"observation","code":"cost_variance","subject":"BILL-1","detail":"Billed cost differs from tariff-based expected cost by 25%."}],"limitations":["Meter readings, bills, tariffs, equipment records, and occupancy rows are copied only from labeled fields supplied by the caller.","Consumption and cost use supplied units and tariffs only. Missing tariffs are not invented.","Unusual usage is compared against a baseline calculated from supplied readings for the same meter or utility.","Buildings are compared only when measurement periods and units are compatible.","Equipment performance and savings are never invented. HVAC and connected equipment are never controlled."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.12"},"protocols":[{"x402":{}}]}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}