Carton Orientation Fit

Find the smallest listed carton that fits one rectangular item plus per-side padding, with optional upright-only rotation.

Custom requests cost 0.04 USDC on Base.

Download example JSON · OpenAPI · Source and usage

Pay with a browser wallet · Open example in checkout

POST a JSON request to /carton-orientation-fit/v1/check with an x402 V2 client.

Worked example

Request

{
  "item_mm": [
    9,
    5,
    3
  ],
  "padding_mm": 1,
  "upright": true,
  "cartons": [
    {
      "id": "large",
      "inner_mm": [
        12,
        8,
        5
      ]
    },
    {
      "id": "favored",
      "inner_mm": [
        7,
        11,
        5
      ]
    },
    {
      "id": "flat",
      "inner_mm": [
        12,
        8,
        4
      ]
    }
  ]
}

Result

{
  "selected": {
    "id": "favored",
    "oriented_item_mm": [
      5,
      9,
      3
    ],
    "spare_mm": [
      0,
      0,
      0
    ]
  },
  "fitting_cartons": 2
}

Support catalog maintenance through GitHub Sponsors. Sponsor gptenv · Sponsor Jeremy Carter