{"openapi":"3.1.0","info":{"title":"Daily Energy Peak Interval","version":"1.0.0","description":"Convert fixed-duration meter intervals into average demand and identify the peak interval and daily recorded energy.","contact":{"email":"jeremy@jeremycarter.ca"}},"servers":[{"url":"https://gptenv-x402-catalog.defcronyke.workers.dev"}],"paths":{"/daily-energy-peak-interval/v1/check":{"post":{"operationId":"daily_energy_peak_interval","summary":"Convert fixed-duration meter intervals into average demand and identify the peak interval and daily recorded energy.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.04"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"minutes":{"type":"integer","exclusiveMinimum":0,"maximum":1440},"intervals":{"minItems":1,"maxItems":300,"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":1000000000},"watt_hours":{"type":"integer","minimum":0,"maximum":10000000000}},"required":["start","watt_hours"],"additionalProperties":false}}},"required":["minutes","intervals"],"additionalProperties":false},"example":{"minutes":15,"intervals":[{"start":0,"watt_hours":600},{"start":15,"watt_hours":900}]}}}},"responses":{"200":{"description":"Service result","content":{"application/json":{"schema":{"type":"object"},"example":{"total_watt_hours":1500,"maximum_average_watts":3600,"peak_starts":[15],"missing_intervals":0}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 exact payment required on Base"},"503":{"description":"Payment unavailable"}}}}}}