Quickstart
From a key to a first cutting plan in a few minutes: get a key, send one request, read the answer.
1. Get a key
Sign in and create a free test key on the dashboard: 1,000 calls a month, never billed. Live keys come with an Engine API plan. To look around before that, the "Run this example" buttons in the guides use a public demo key with no account at all.
2. Send one request
POST the parts and the stock to /v1/optimize/2d, with the key in the Authorization header. This is the documented example:
curl -s https://api.cutoptim.com/v1/optimize/2d \
-H "Authorization: Bearer $CUTOPTIM_KEY" \
-H "Content-Type: application/json" \
-d '{"parts":[{"name":"Door","w":600,"h":400,"qty":4,"rotatable":true}],"stock":[{"w":2440,"h":1220,"qty":10,"price":42}],"options":{"kerf":3,"trim":{"left":10,"top":10},"minimizeCost":true,"effort":"balanced"},"engine":"heuristic","include":["cutPlan","offcuts"]}'Or with an SDK
The same request through an official client for TypeScript, Python or PHP — it adds safe retries and a typed error. Installing and the rest are in the SDK guide. Official SDKs
// npm install @cutoptim/engine
import { CutOptim } from '@cutoptim/engine';
const client = new CutOptim({ apiKey: process.env.CUTOPTIM_KEY });
const plan = await client.optimize2d({"parts":[{"name":"Door","w":600,"h":400,"qty":4,"rotatable":true}],"stock":[{"w":2440,"h":1220,"qty":10,"price":42}],"options":{"kerf":3,"trim":{"left":10,"top":10},"minimizeCost":true,"effort":"balanced"},"engine":"heuristic","include":["cutPlan","offcuts"]});# pip install cutoptim
import os
from cutoptim import CutOptim
client = CutOptim(api_key=os.environ["CUTOPTIM_KEY"])
plan = client.optimize_2d({"parts":[{"name":"Door","w":600,"h":400,"qty":4,"rotatable":True}],"stock":[{"w":2440,"h":1220,"qty":10,"price":42}],"options":{"kerf":3,"trim":{"left":10,"top":10},"minimizeCost":True,"effort":"balanced"},"engine":"heuristic","include":["cutPlan","offcuts"]})// composer require cutoptim/engine
use CutOptim\Engine\Client;
$client = new Client(getenv('CUTOPTIM_KEY'));
$plan = $client->optimize2d(json_decode('{"parts":[{"name":"Door","w":600,"h":400,"qty":4,"rotatable":true}],"stock":[{"w":2440,"h":1220,"qty":10,"price":42}],"options":{"kerf":3,"trim":{"left":10,"top":10},"minimizeCost":true,"effort":"balanced"},"engine":"heuristic","include":["cutPlan","offcuts"]}', true));3. Read the answer
sheets lists every sheet with its placed parts (x, y, w, h, rotated) and offcuts; metrics gives sheetCount and yieldPct; cutPlan is the saw sequence. A job that does not fit completely is still a 200 — check unplaced and warnings.
{
"engine": "heuristic",
"sheets": [
{
"w": 2440,
"h": 1220,
"price": 42,
"parts": [
{
"name": "Door",
"x": 10,
"y": 10,
"w": 600,
"h": 400,
"rotated": false
},
{
"name": "Door",
"x": 613,
"y": 10,
"w": 600,
"h": 400,
"rotated": false
}
],
"offcuts": [
{
"x": 2422,
"y": 10,
"w": 18,
"h": 400
}
]
}
],
"metrics": {
"sheetCount": 1,
"yieldPct": 32.25,
"placed": 4,
"total": 4,
"cutLines": 5,
"sawPasses": 5,
"cutLength": 4030,
"totalPrice": 42
},
"unplaced": [],
"warnings": []
}Next
Check a request for free with /v1/validate/2d before you spend a call, try 1D and timber, and see every endpoint in the interactive reference.