{"openapi":"3.1.0","info":{"title":"Brimload T1 WebAPI","version":"1.1.0","description":"Public JSON API for single-carton container loading. Depth 2 is the default; Depth 3 is an explicit protected solve. The service labels heuristic fallbacks when inputs exceed the public exact-T1 numeric limits."},"servers":[{"url":"https://mcp.cuberithm.com"}],"paths":{"/api/t1/pack":{"post":{"summary":"Pack one carton type into a rectangular space","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Provide carton, box, or flat box_* dimensions; provide container or space.","properties":{"container":{"type":"string","description":"Optional preset such as 20GP, 40HQ, 45HQ, 53HC, 40RF, or 40HQ-PW."},"space":{"type":"object","properties":{"length":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"}}},"carton":{"type":"object","properties":{"length":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"}}},"box":{"type":"string","description":"Optional carton shorthand such as 600x400x350."},"count":{"type":"integer","default":0},"depth":{"type":"integer","enum":[2,3],"default":2},"upright_only":{"type":"boolean","default":false},"load_direction":{"type":"string","enum":["front","bottom","right"],"description":"Fixed-quantity placement priority; new clients use this instead of the legacy corner flags."},"to_front":{"type":"boolean","default":true},"to_left":{"type":"boolean","default":true},"to_bottom":{"type":"boolean","default":true,"description":"Accepted for compatibility, no effect: boxes always rest on the floor."},"include_image_url":{"type":"boolean","default":true}}},"examples":{"container":{"value":{"container":"40HQ","carton":{"length":600,"width":400,"height":350},"depth":2,"include_image_url":false}},"explicitSpace":{"value":{"space":{"length":12032,"width":2352,"height":2698},"carton":{"length":220,"width":150,"height":155}}}}}}},"responses":{"200":{"description":"Packing result"},"400":{"description":"Invalid input"},"429":{"description":"Rate limited"},"503":{"description":"Depth 3 busy or solver unavailable"},"504":{"description":"Depth 3 timed out"}}}},"/api/t1/openapi.json":{"get":{"summary":"OpenAPI contract for the T1 WebAPI"}},"/api/t1/prepare":{"post":{"summary":"Prepare the protected browser solver","description":"Returns a short-lived request ticket, the external key for the requested encrypted solver generation, and the request-bound Quant search payload. Approved Zhihuo browser origins only.","responses":{"200":{"description":"Protected solver preparation"},"400":{"description":"Invalid input"},"403":{"description":"Unapproved browser origin"},"429":{"description":"Rate limited"},"503":{"description":"Solver generation unavailable"}}}},"/api/t1/witness":{"post":{"summary":"Construct and verify the browser result layout","description":"Consumes the request-bound preparation ticket and the browser's local count result, then returns the exact placed layout after native parity verification. Approved Zhihuo browser origins only.","responses":{"200":{"description":"Verified packing result"},"400":{"description":"Invalid input or local result"},"403":{"description":"Unapproved browser origin"},"409":{"description":"Expired ticket or parity error"},"429":{"description":"Rate limited"},"503":{"description":"Solver unavailable or busy"},"504":{"description":"Depth 3 timed out"}}}}}}