{"openapi":"3.1.0","info":{"title":"Kiln Shelf Capacity","version":"1.0.0","description":"Assign ordered workpieces to shelves using supplied footprint and load limits, then flag pieces that need a different shelf.","contact":{"email":"jeremy@jeremycarter.ca"}},"servers":[{"url":"https://gptenv-x402-catalog.defcronyke.workers.dev"}],"paths":{"/kiln-shelf-capacity/v1/check":{"post":{"operationId":"kiln_shelf_capacity","summary":"Assign ordered workpieces to shelves using supplied footprint and load limits, then flag pieces that need a different shelf.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.04"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"shelves":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"area_cm2":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"grams":{"type":"integer","exclusiveMinimum":0,"maximum":100000000}},"required":["id","area_cm2","grams"],"additionalProperties":false}},"items":{"maxItems":250,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"area_cm2":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"grams":{"type":"integer","exclusiveMinimum":0,"maximum":100000000}},"required":["id","area_cm2","grams"],"additionalProperties":false}}},"required":["shelves","items"],"additionalProperties":false},"example":{"shelves":[{"id":"top","area_cm2":100,"grams":50},{"id":"low","area_cm2":120,"grams":90}],"items":[{"id":"vase","area_cm2":30,"grams":70},{"id":"cup","area_cm2":50,"grams":10}]}}}},"responses":{"200":{"description":"Service result","content":{"application/json":{"schema":{"type":"object"},"example":{"shelves":[{"id":"top","items":["cup"],"remaining_area_cm2":50,"remaining_grams":40},{"id":"low","items":["vase"],"remaining_area_cm2":90,"remaining_grams":20}],"unplaced":[]}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 exact payment required on Base"},"503":{"description":"Payment unavailable"}}}}}}