Skip to content

Quick start

From zero to a working guillotine layout in a few minutes.

1. Use the canonical request shape

The anonymous playground accepts a small private-beta quota without a key. If you need a larger evaluation window, request a free evaluation key. Exact beta limits may change while the service is still pre-production.

Representative request body:

{
  "sheets": [
    {
      "width": 3210,
      "height": 2250,
      "quantity": 1,
      "kerfWidth": 4
    }
  ],
  "pieces": [
    {
      "originalIndex": 0,
      "width": 800,
      "height": 600,
      "quantity": 4,
      "canRotate": true
    },
    {
      "originalIndex": 1,
      "width": 1200,
      "height": 900,
      "quantity": 2,
      "canRotate": true
    }
  ],
  "params": {
    "kerfWidth": 4
  },
  "strategy": "greedy"
}
curl -X POST https://api.cutweaver.io/api/v1/solve \
  -H "Content-Type: application/json" \
  -d @quickstart_greedy_request.json
const payload = {
  sheets: [
    { width: 3210, height: 2250, quantity: 1, kerfWidth: 4 },
  ],
  pieces: [
    { originalIndex: 0, width: 800, height: 600, quantity: 4, canRotate: true },
    { originalIndex: 1, width: 1200, height: 900, quantity: 2, canRotate: true },
  ],
  params: { kerfWidth: 4 },
  strategy: "greedy",
};

const res = await fetch("https://api.cutweaver.io/api/v1/solve", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify(payload),
});

const data = await res.json();
console.log(data);
import requests

payload = {
    "sheets": [
        {"width": 3210, "height": 2250, "quantity": 1, "kerfWidth": 4},
    ],
    "pieces": [
        {"originalIndex": 0, "width": 800, "height": 600, "quantity": 4, "canRotate": True},
        {"originalIndex": 1, "width": 1200, "height": 900, "quantity": 2, "canRotate": True},
    ],
    "params": {"kerfWidth": 4},
    "strategy": "greedy",
}

res = requests.post(
    "https://api.cutweaver.io/api/v1/solve",
    json=payload,
    timeout=10,
)
print(res.json())

2. Read the envelope

Representative successful response:

{
  "ok": true,
  "contractVersion": "v1",
  "result": {
    "sheetsUsed": 1,
    "totalPlaced": 6,
    "totalUsedArea": 4080000,
    "totalWasteArea": 3142500,
    "totalUnplacedPriority": 0,
    "unplacedIndices": [],
    "sheets": [
      {
        "sheetIndex": 0,
        "placedCount": 6,
        "utilization": 0.56,
        "placements": [
          { "pieceId": 0, "width": 800, "height": 600, "x": 0, "y": 0, "rotated": false }
        ],
        "cutTree": { "type": "cut", "direction": "V", "width": 3210, "height": 2250 }
      }
    ]
  }
}

All linear values are millimetres.

3. Request an evaluation key when you need more volume

Canonical request body:

{
  "email": "[email protected]",
  "plan": "free"
}
curl -X POST https://api.cutweaver.io/api/v1/request-key \
  -H "Content-Type: application/json" \
  -d @request_key_free.json

The same normalized email returns the same active key, so you can safely re-run this during setup.

4. Expand from the baseline

Goal Use
Deeper search on waste-sensitive jobs Set "strategy": "alns" and add alnsConfig
More hosted API volume Issue a free evaluation key or request a paid plan via Pricing
SVG output for inspection Set "includeSvg": true and read the top-level svg array
Private deployment Reuse the same contract in Self-hosted access

5. Next steps