Skip to main content
← CutOptim Engine APIEngine API · live today

Tube & Pipe Cutting Optimization API

Yes — there is an API for tube and pipe cutting. Cutting tube, pipe or hollow section to length is a 1D cutting-stock problem, and the same engine that powers the CutOptim app is callable over HTTP. Your ERP, estimating or MES software sends the cut list and the available bar lengths as JSON and gets back the optimized cut plan, the number of bars and the yield — no browser, no clicks.

This is live today — the CutOptim engine already runs 1D optimization in production for the app; the Engine API exposes the exact same solver over HTTP, so the plan an API call returns matches what the app shows.

POST /v1/optimize/1d
{
  "parts": [
    { "length": 1200, "qty": 8, "meta": { "ref": "RHS-40x40" } },
    { "length": 2450, "qty": 4 }
  ],
  "stock": [{ "length": 6000, "qty": 50, "price": 21.5 }],
  "options": { "kerf": 2 }
}
Uses a public demo key — rate-limited, small jobs only, never billed.
  • Live today on POST /v1/optimize/1d — the same engine as the app, not a pre-release.
  • Free validation: POST /v1/validate/1d checks a job with no key and no quota.
  • Attach a meta object (article number, order line) and it comes back on every placed cut.
  • The reported off-cut is the usable remainder — the freeing kerf is already deducted.

Why fabricators need it

Cutting a job of tube or pipe in the order it appears on the list leaves an offcut on almost every bar, and many of them are too short to use. A 1D optimizer rearranges the cuts across bars so the job needs as few bars as it can find. Doing it by hand does not scale to hundreds of parts; doing it inside your own software, through the API, does.

What you send and what comes back

Send the part lengths (with quantities) and the available bar lengths and prices as JSON. The response carries the full cut plan bar by bar, the bar count, the yield, the total length sawn, and the usable off-cut left on each bar (kerf already deducted). Ask for include:["csv","dxf"] and the cut list comes back as a file inline in the response.

Deterministic — reproducible for quotes and audits

The same request always returns the same cut plan: no randomness, no clock in the algorithm. A quote built from an API call can be reproduced months later for an audit or a repeat order, and results can be cached and diffed in tests.

Downloadable resource
Tube & Pipe Cutting API one-pager

A two-page summary — the problem, what you send and get back, a request and response, and how to build on the engine. Print-ready, with a QR back to this page.

PDF2 pagesFree
Download the PDF

FAQ

Is there an API for tube or pipe cutting optimization?
Yes. Tube, pipe and hollow section cut to length is a 1D cutting-stock problem, and the CutOptim Engine API solves it at POST /v1/optimize/1d. You send the cut list and the stock bar lengths as JSON and get back the optimized cut plan, the bar count, the yield and the usable off-cuts. It is the same engine that runs the CutOptim app, callable over HTTP.
Can I try it before committing?
Yes. POST /v1/validate/1d checks a request without solving — for free, with no API key and no quota spent — so your developers can confirm a payload is well-formed while building the integration. The Engine API itself has a 14-day trial.
Does it handle different bar lengths and prices?
Yes. You can send several stock bar lengths, each with a quantity and a price. With options.minimizeCost the engine ranks plans by total stock price rather than bar count, and returns totalPrice with the plan — useful when longer bars cost disproportionately more.
How are blade width and bar-end trim handled?
Set options.kerf to the saw blade width and it is deducted at every cut; options.trim.start and options.trim.end reserve the squaring cut at each end of the bar. The off-cut reported on each bar is the usable remainder after all of that, so it can go straight back into your stock list. Set options.minOffcut to report only remainders long enough to keep.
Can it plan with only the bars I have in stock?
Yes. Set options.respectStock and each stock quantity becomes a hard limit: the engine plans with the bars you actually have, and any part that does not fit comes back in unplaced instead of being cut from a bar you do not own. Without it, the plan assumes more bars can be bought and tells you how many to order.

Metalworking use case (app) · Benchmarks