{"openapi":"3.1.0","info":{"title":"Histogram Percentile Bounds","version":"1.0.0","description":"Locate nearest-rank percentiles in cumulative nonnegative histogram buckets and return their exact bucket bounds.","contact":{"email":"jeremy@jeremycarter.ca"}},"servers":[{"url":"https://gptenv-x402-catalog.defcronyke.workers.dev"}],"paths":{"/histogram-percentile-bounds/v1/check":{"post":{"operationId":"histogram_percentile_bounds","summary":"Locate nearest-rank percentiles in cumulative nonnegative histogram buckets and return their exact bucket bounds.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.04"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"buckets":{"minItems":1,"maxItems":150,"type":"array","items":{"type":"object","properties":{"upper":{"anyOf":[{"type":"number","minimum":0,"maximum":1000000000000},{"type":"null"}]},"cumulative_count":{"type":"integer","minimum":0,"maximum":1000000000000}},"required":["upper","cumulative_count"],"additionalProperties":false}},"percentile_bps":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"integer","minimum":1,"maximum":10000}}},"required":["buckets","percentile_bps"],"additionalProperties":false},"example":{"buckets":[{"upper":10,"cumulative_count":4},{"upper":25,"cumulative_count":9},{"upper":null,"cumulative_count":10}],"percentile_bps":[5000,9000,9900]}}}},"responses":{"200":{"description":"Service result","content":{"application/json":{"schema":{"type":"object"},"example":{"samples":10,"percentiles":[{"percentile_bps":5000,"rank":5,"lower":10,"upper":25},{"percentile_bps":9000,"rank":9,"lower":10,"upper":25},{"percentile_bps":9900,"rank":10,"lower":25,"upper":null}]}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 exact payment required on Base"},"503":{"description":"Payment unavailable"}}}}}}