RSJ 3D Packer 3D bin packing, palletising and load optimisation

← All posts

2026-10-24

Packing Optimisation API: What Developers Should Check

Packing Optimisation API: What Developers Should Check
RSJ 3D Packer packing optimization item packer

Packing Optimisation API for Developers: What to Check

It’s Thursday morning. You’re a solo developer or a two-person agency, and the client — or your own ops team — wants container loading inside the internal tool. Not a research project. A feature: “tell us how many containers this order needs and where each box goes.”

That leaves three realistic paths. Write a solver yourself (weeks, minimum). Wrap an open-source library (days to weeks, plus the tuning and hosting that comes after). Or call a managed packing optimisation API (an afternoon of curl, if you pick well).

This post is a checklist for that third path — the specific things worth verifying in a packing optimisation API before you commit a sprint to it. RSJ 3D Packer is the worked example throughout, because it’s a concrete API with documented inputs, outputs and constraints. If you first need the vocabulary of the underlying problem — bins, items, rotations, stacking — the sibling article The 3D Bin Packing Problem, Explained Without the Math covers it. This article assumes you’ve decided to integrate, not to research.

Why the API choice matters more than the algorithm

For a small team shipping an internal tool, solver internals are rarely the deciding factor. Integration time is. So is the predictability of the request/response shape, because that’s what your UI, your database and your client code get built around.

A managed JSON REST API removes the whole hosting-and-tuning layer. You don’t run a solver, you don’t size a VM for it, you don’t babysit it. The contract is stated up front: RSJ 3D Packer works with a 240 second time budget per request, and that number is the same on every plan. You can design around it before you write a line of code.

One design question worth settling early: is your problem static or dynamic? In the static problem — what RSJ 3D Packer solves — items may be packed in any order. The solver is free to try whatever arrangement performs best, which is exactly what most internal tools need: given this order and this container type, how does it fit? Dynamic variants, such as a fixed packing order or a required unpacking order, are an extension of the algorithm, not a default. If your warehouse floor team needs to unload in reverse of loading, say so during evaluation — don’t assume it.

Plan-level details (what each subscription unlocks, monthly versus yearly billing) live in 3D Bin Packing Software Pricing: What Plans Actually Include. Here we stay on the API.

The checklist: what to verify in a packing optimisation API

Geometry and inputs

Every item and every container carries its own width, height and depth, mapping to x/y/z. Per item you send a count, plus optional weight, itemClass, vertical, riskPoints, riskTypes and an id of your choosing. Per container: width, height, depth, count, and optionally weight (maximum load), allowedRiskPoints and itemClass.

{
  "containers": [
    { "width": 48, "height": 47, "depth": 46, "count": 1, "weight": 2000, "allowedRiskPoints": 1000 }
  ],
  "items": [
    { "width": 11, "height": 6, "depth": 6, "count": 51 },
    { "width": 7, "height": 8, "depth": 9, "count": 53, "vertical": false, "itemClass": 1, "weight": 12 },
    { "width": 8, "height": 9, "depth": 10, "count": 57, "riskTypes": [1, 2], "riskPoints": 10 }
  ],
  "risks": [{ "type1": 1, "type2": 2 }]
}

count defaults to one when omitted; itemClass and risk types are integers, while weight, riskPoints and allowedRiskPoints are numbers. Two practical details worth testing on day one: unknown keys in request objects are ignored, so your own metadata can travel along with the payload — and a future field could collide with a key you invented, so prefix your metadata rather than calling it weight.

Constraints that matter in practice

This is where APIs differentiate, and where a demo that only packs identical boxes falls apart.

  • Stacking classes. An item is only ever placed on items of a lower or equal class. If heavy pallets must never sit on light cartons, that’s an itemClass problem, not a UI warning.
  • No floating items. Every packed item is supported by the item below it. The plan contains no floating boxes, so your 3D view won’t show something hovering two centimetres above a gap.
  • Weight limits per container. Optional on the container side, and a paid-plan feature in RSJ 3D Packer.
  • Dangerous goods. Items carry risk types and risk points; containers carry a maximum number of risk points; risks declares pairs of risk types that must not be loaded together. Support for this starts at the Pro plan.

Result contents

A solver that returns only x/y/z coordinates leaves you to compute everything a user actually wants to see. Check that the response includes fill percentage per container, the number of containers used, and unpacked items with counts — that last one is how you tell a user “17 boxes did not fit” instead of silently dropping them.

{
  "containers": [
    { "width": 48, "height": 47, "depth": 46, "count": 1, "used": 1, "filled": 76.77, "first": 0 }
  ],
  "packedItems": [
    { "id": 0, "c": 0, "width": 11, "height": 6, "depth": 6, "x": 0, "y": 0, "z": 0 }
  ],
  "unpackedItems": [
    { "id": 2, "width": 8, "height": 9, "depth": 10, "weight": 0, "itemClass": 0, "count": 17 }
  ]
}

RSJ 3D Packer also returns a viewer URL and an API sandbox URL in the result, which shortens the feedback loop: you can hand a colleague a link to the 3D view before your own frontend exists.

Authentication and session handling

The flow is two-step. You log in once to obtain a session, then send that session as a Bearer token. The session is valid for roughly a day, so fetch a fresh one rather than storing it long-term.

# 1. Exchange your account for a session (the hmac is derived server-side while logged in)
curl "https://3dpacker.rsj.de/user/you@example.com?hmac={hmac}"

# 2. Use the returned session on every subsequent call
curl -H "Authorization: Bearer session-1bc90169-1c83-443e-8ed7-b0328aaf78a5" \
     https://3dpacker.rsj.de/solve

The browser application authenticates with cookies instead, which is what the API sandbox relies on.

Delivery and export

Ask how you can run it and how you get the result out. RSJ 3D Packer is available as a cloud subscription, an on-premises server (Windows 10/11 64 Bit or Ubuntu Linux 64 Bit, 16 GB RAM, 4 GB hard disk) or a stand-alone program — the same 240 second budget applies on every plan. Solutions can be downloaded as a GLB 3D model, which matters if your tool already renders 3D or you want to attach a model to a job record.

A practical playbook for the first integration

1. Start in the browser, not in your editor. Open the application, load a small real dataset, and watch the 3D result. Then move to the API sandbox, which is a live request/response playground with a 3D preview written in plain JavaScript. You’ll learn more in ten minutes there than from an hour of reading.

2. Model one container type and two or three item types first. Get a basic solve returning sensible fill percentages. Only then add weight, itemClass and the risk fields — one dimension at a time, so you know which change broke the plan.

3. Use the OpenAPI 3.0 document as the contract. The spec at openapi.yaml is machine readable; generate a client from it or hand-write against it, but don’t guess field names. The rendered reference lives at 3ddocs.html.

import requests

session = "session-1bc90169-1c83-443e-8ed7-b0328aaf78a5"  # fetch fresh, don't persist
payload = {
    "containers": [{"width": 48, "height": 47, "depth": 46, "count": 1}],
    "items": [
        {"width": 11, "height": 6, "depth": 6, "count": 51},
        {"width": 7, "height": 8, "depth": 9, "count": 53, "vertical": False},
    ],
}

r = requests.post(
    "https://3dpacker.rsj.de/solve",
    json=payload,
    headers={"Authorization": f"Bearer {session}"},
    timeout=300,  # the solver budget is 240 s; leave headroom
)
plan = r.json()
print(plan["containers"][0]["filled"], len(plan["unpackedItems"]))

4. Treat the 240 second budget as a design constraint. Decide now what your UI shows while a solve is in flight — a spinner with a message about the container count is honest; a fake progress bar is not — and what it shows for unpacked items. Those two states are the feature.

Wiring raw protocol calls or hand-rolling a solver is possible, of course. It’s the hard way, and it’s the reason the managed POST /solve above is what this article recommends.

What to avoid when picking a packing optimisation API

  • APIs that hide the result shape. If you can’t get per-container fill percentage and explicit unpacked items, you’ll be building a UI on top of coordinates alone.
  • Assuming rotation is free. If an item must stay upright, the API has to express it. In RSJ 3D Packer that’s "vertical": false.
  • Designing around features your plan doesn’t include. Different container sizes, weight limits and preventing vertical rotation start at Standard; dangerous goods at Pro. Every plan can be tested free for 30 days, and the free test exposes the Pro feature set — so prototype against everything, then check what you’ll actually be paying for.
  • Storing sessions long-term. The session lasts about a day. Fetch a fresh one instead of caching it in a database.
  • Treating the solver as real-time. It’s a request/response planning step with a stated time budget, not something you call on every keystroke.

Where RSJ 3D Packer fits for developer teams

RSJ 3D Packer is a managed JSON REST solver: a documented OpenAPI contract, a browser UI with an interactive 3D view that can be embedded in an IFRAME, and — for the cloud version — a Google Sheets add-on. The core is a neural network optimised through neuro-evolution, but you never touch it; you send JSON and read JSON.

Different teams will want different delivery models: a cloud subscription if you’d rather not own infrastructure, an on-premises server if data can’t leave the network (Windows 10/11 64 Bit or Ubuntu Linux 64 Bit, 16 GB RAM, 4 GB hard disk), or a stand-alone program for a single workstation. You can evaluate all of it without a sales call — start at the API reference and the sandbox, and see a sample packing solution rendered in the viewer.

It’s one option that matches the checklist above. Run the same checklist against anything else you’re considering.

FAQ

Can a packing optimisation API handle items that must not be rotated?

Yes, if the API exposes it. In RSJ 3D Packer you set "vertical": false on the item, which prevents it from being rotated out of its upright position. This field is available on the Standard and Pro plans.

How are dangerous goods constraints expressed in a packing request?

Items carry riskTypes and riskPoints, containers carry allowedRiskPoints, and an optional risks array declares pairs of risk types that must not be loaded together. Dangerous goods support is a Pro feature in RSJ 3D Packer.

What does the response contain besides item positions?

The RSJ 3D Packer response includes packed items with container index and x/y/z, fill percentage per container, the number of containers used, unpacked items with counts, a viewer URL and an API sandbox URL.

Can the same packing API run on-premises?

RSJ 3D Packer is offered as a cloud subscription, an on-premises server for Windows 10/11 64 Bit or Ubuntu Linux 64 Bit with 16 GB RAM and 4 GB hard disk, or a stand-alone program. The solver time budget of 240 seconds per request applies on every plan.

Conclusion

The Friday deadline is won or lost on integration details, not on solver internals: a stable request shape, explicit constraints, a response that already contains fill percentage and unpacked counts, and a session flow you can implement in twenty lines. Verify those five things and the rest is UI.

Start with a free 30-day test on the packing application — it exposes the Pro feature set, so you can exercise weights, rotation and risk fields before deciding which plan your client’s budget covers. Punch your own dataset into the sandbox first; a real solve on real numbers is the only evaluation that counts.

Related posts

EU label: AI-generated content