{"openapi":"3.1.0","info":{"title":"Join Cardinality Preview","version":"1.0.0","description":"Predict inner, left and full equality-join row counts from key multiplicities and identify which keys cause many-to-many fanout.","contact":{"email":"jeremy@jeremycarter.ca"}},"servers":[{"url":"https://gptenv-x402-catalog.defcronyke.workers.dev"}],"paths":{"/join-cardinality-preview/v1/check":{"post":{"operationId":"join_cardinality_preview","summary":"Predict inner, left and full equality-join row counts from key multiplicities and identify which keys cause many-to-many fanout.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.04"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"left":{"maxItems":250,"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"rows":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9][0-9]{0,19}$"}]}},"required":["key","rows"],"additionalProperties":false}},"right":{"maxItems":250,"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"rows":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9][0-9]{0,19}$"}]}},"required":["key","rows"],"additionalProperties":false}}},"required":["left","right"],"additionalProperties":false},"example":{"left":[{"key":"a","rows":3},{"key":"b","rows":1},{"key":null,"rows":2}],"right":[{"key":"a","rows":2},{"key":"c","rows":4},{"key":null,"rows":1}]}}}},"responses":{"200":{"description":"Service result","content":{"application/json":{"schema":{"type":"object"},"example":{"inner_rows":"6","left_rows":"9","full_rows":"14","unmatched_left_rows":"3","unmatched_right_rows":"5","many_to_many":[{"key":"a","joined_rows":"6"}]}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 exact payment required on Base"},"503":{"description":"Payment unavailable"}}}}}}