Service banner
No request body.BinSolver APISend your API key in x-api-key. Keys are managed in the dashboard.
1.0.2 Stable
BinSolver API is a focused API for 3D bin packing. Send items and bins with constraints like rotation, nesting, stacking, and shipping objectives, and get an optimized arrangement in milliseconds.
Send JSON with item dimensions, bin dimensions, quantities, and an objective. Item ids must be unique; when quantity is set, ids expand with # suffixes. Add an optional x-request-id header for tracing.
Successful pack calls return packed bins (each with a vizUrl), unplaced items, and stats. Errors share a consistent JSON error envelope.
Create an API key, send a pack request, and inspect the placements. The response is deterministic and fast, even for high-volume shipments.
Generate a key in the dashboard and store it as $BINSOLVER_API_KEY.
Use the /v1/pack endpoint for stable clients and set an objective like minBins or minWaste.
Use the returned dimensions, positions, and rotations, or open bin.vizUrl in /viz to review the fit or drive fulfillment logic.
curl -X POST https://api.binsolver.com/v1/pack \
-H "x-api-key: $BINSOLVER_API_KEY" \
-H "content-type: application/json" \
-d '{
"allowUnplaced": true,
"objective": "minBins",
"items": [
{
"id": "item-1",
"w": 2,
"h": 2,
"d": 1,
"quantity": 2
}
],
"bins": [
{
"id": "small-box",
"w": 4,
"h": 3,
"d": 3,
"quantity": 1
}
]
}'Official client libraries are available for Python, TypeScript, and Go.
pip install binsolver Fully typed with Pydantic models. View on GitHub
npm install binsolver Generated from OpenAPI specs. View on GitHub
go get github.com/welltyped-systems/binsolver-go Context-aware and strongly typed. View on GitHub
Authenticate requests using your API key in the x-api-key header. .
x-api-key: $BINSOLVER_API_KEYEach endpoint is documented with parameters, request shape, and response samples. Use /v1/pack for long-lived clients.
Service banner
No request body.BinSolver APIHealth check
No request body.okPack items into bins
{
"allowUnplaced": true,
"objective": "minBins",
"items": [
{
"id": "item-1",
"w": 2,
"h": 2,
"d": 1,
"quantity": 2
}
],
"bins": [
{
"id": "small-box",
"w": 4,
"h": 3,
"d": 3,
"quantity": 1
}
]
}{
"bins": [
{
"binId": "bin-1",
"templateId": "small-box",
"w": 4,
"h": 3,
"d": 3,
"vizUrl": "https://binsolver.com/viz?l=example",
"utilization": 0.44,
"placements": [
{
"itemId": "item-1#1",
"x": 0,
"y": 0,
"z": 0,
"w": 2,
"h": 2,
"d": 1,
"rotation": "xyz"
},
{
"itemId": "item-1#2",
"x": 2,
"y": 0,
"z": 0,
"w": 2,
"h": 2,
"d": 1,
"rotation": "xyz"
}
]
}
],
"unplaced": [],
"stats": {
"items": 2,
"placed": 2,
"unplaced": 0,
"binsUsed": 1,
"durationMs": 3
}
}Pack items into bins
{
"allowUnplaced": true,
"objective": "minBins",
"items": [
{
"id": "item-1",
"w": 2,
"h": 2,
"d": 1,
"quantity": 2
}
],
"bins": [
{
"id": "small-box",
"w": 4,
"h": 3,
"d": 3,
"quantity": 1
}
]
}{
"bins": [
{
"binId": "bin-1",
"templateId": "small-box",
"w": 4,
"h": 3,
"d": 3,
"vizUrl": "https://binsolver.com/viz?l=example",
"utilization": 0.44,
"placements": [
{
"itemId": "item-1#1",
"x": 0,
"y": 0,
"z": 0,
"w": 2,
"h": 2,
"d": 1,
"rotation": "xyz"
},
{
"itemId": "item-1#2",
"x": 2,
"y": 0,
"z": 0,
"w": 2,
"h": 2,
"d": 1,
"rotation": "xyz"
}
]
}
],
"unplaced": [],
"stats": {
"items": 2,
"placed": 2,
"unplaced": 0,
"binsUsed": 1,
"durationMs": 3
}
}Types referenced across the API. Click to reveal fields.
Errors follow a consistent JSON envelope with a code, message, and optional request id for tracing.
{
"error": {
"code": "rate_limited",
"message": "Too many requests",
"requestId": "req_3f2e9d"
}
}