{"openapi":"3.1.0","info":{"title":"Focal Crop Geometry","version":"1.0.0","description":"Calculate the largest exact-aspect pixel crop while keeping a focal point as close to the crop center as image bounds allow.","contact":{"email":"jeremy@jeremycarter.ca"}},"servers":[{"url":"https://gptenv-x402-catalog.defcronyke.workers.dev"}],"paths":{"/focal-crop-geometry/v1/check":{"post":{"operationId":"focal_crop_geometry","summary":"Calculate the largest exact-aspect pixel crop while keeping a focal point as close to the crop center as image bounds allow.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.04"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image_width":{"type":"integer","minimum":1,"maximum":100000},"image_height":{"type":"integer","minimum":1,"maximum":100000},"ratio_width":{"type":"integer","minimum":1,"maximum":100000},"ratio_height":{"type":"integer","minimum":1,"maximum":100000},"focal_x":{"type":"number","minimum":0,"maximum":100000},"focal_y":{"type":"number","minimum":0,"maximum":100000}},"required":["image_width","image_height","ratio_width","ratio_height","focal_x","focal_y"],"additionalProperties":false},"example":{"image_width":1200,"image_height":800,"ratio_width":1,"ratio_height":1,"focal_x":1000,"focal_y":300}}}},"responses":{"200":{"description":"Service result","content":{"application/json":{"schema":{"type":"object"},"example":{"crop":{"x":400,"y":0,"width":800,"height":800},"focal_in_crop":{"x":600,"y":300}}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 exact payment required on Base"},"503":{"description":"Payment unavailable"}}}}}}