{"openapi":"3.1.0","info":{"title":"Penny Exact Cost Split","version":"1.0.0","description":"Allocate one integer-cent bill by weights with deterministic rounding and exact totals.","contact":{"email":"jeremy@jeremycarter.ca"}},"servers":[{"url":"https://gptenv-x402-catalog.defcronyke.workers.dev"}],"paths":{"/penny-exact-cost-split/v1/check":{"post":{"operationId":"penny_exact_cost_split","summary":"Allocate one integer-cent bill by weights with deterministic rounding and exact totals.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.04"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cents":{"type":"integer","minimum":0,"maximum":1000000000000},"shares":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60},"weight":{"type":"integer","exclusiveMinimum":0,"maximum":1000000000}},"required":["id","weight"],"additionalProperties":false}}},"required":["cents","shares"],"additionalProperties":false},"example":{"cents":100,"shares":[{"id":"a","weight":1},{"id":"b","weight":1},{"id":"c","weight":1}]}}}},"responses":{"200":{"description":"Service result","content":{"application/json":{"schema":{"type":"object"},"example":{"cents":100,"allocations":[{"id":"a","cents":34},{"id":"b","cents":33},{"id":"c","cents":33}]}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 exact payment required on Base"},"503":{"description":"Payment unavailable"}}}}}}