API Documentation
Integrate CutOptimizer's 1D cutting optimization directly into your application. Start optimizing programmatically using your API key.
Base URL: https://optimizerapi.sysgadh.comREST / JSON1D Optimization
Submit 1D (linear) cutting jobs and retrieve results.
/optimize-1dRun 1D optimization
Submits a 1D cutting optimization job. Returns a job_id and status 'pending'.
curl -X POST https://optimizerapi.sysgadh.com/optimize-1d \
-H "Authorization: Bearer cutopt_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"stock": [
{
"length": 6000,
"pcs": 10
},
{
"length": 3000,
"pcs": 5
}
],
"requiredCut": [
{
"length": 1200,
"pcs": 8,
"angle_start": 0,
"angle_end": 0
},
{
"length": 800,
"pcs": 12,
"angle_start": 45,
"angle_end": 0
}
],
"kerf": 3,
"allow_partial": false
}'/optimize-1d/status/{job_id}Check 1D job status
Polls the status of an async 1D optimization job. Poll every 1–2 seconds until status is 'completed'.
curl https://optimizerapi.sysgadh.com/optimize-1d/status/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
-H "Authorization: Bearer cutopt_YOUR_API_KEY"/optimize-1d/result/{job_id}Get 1D optimization result
Retrieves the full result of a completed 1D job.
curl https://optimizerapi.sysgadh.com/optimize-1d/result/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
-H "Authorization: Bearer cutopt_YOUR_API_KEY"2D Optimization
Submit 2D (sheet) cutting jobs and retrieve results.
/optimize-2dRun 2D optimization
Submits a 2D sheet cutting optimization job. Returns a job_id and status 'pending'.
curl -X POST https://optimizerapi.sysgadh.com/optimize-2d \
-H "Authorization: Bearer cutopt_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"stock": [
{
"length": 6000,
"pcs": 10
},
{
"length": 3000,
"pcs": 5
}
],
"requiredCut": [
{
"length": 1200,
"pcs": 8,
"angle_start": 0,
"angle_end": 0
},
{
"length": 800,
"pcs": 12,
"angle_start": 45,
"angle_end": 0
}
],
"kerf": 3,
"allow_partial": false
}'/optimize-2d/status/{job_id}Check 2D job status
Polls the status of an async 2D optimization job.
curl https://optimizerapi.sysgadh.com/optimize-2d/status/8a1e6679... \
-H "Authorization: Bearer cutopt_YOUR_API_KEY"/optimize-2d/result/{job_id}Get 2D optimization result
Retrieves the full result of a completed 2D job.
curl https://optimizerapi.sysgadh.com/optimize-2d/result/8a1e6679... \
-H "Authorization: Bearer cutopt_YOUR_API_KEY"History & Exports
Access past runs, re-optimize, and download PDF/DXF reports.
/historyList optimization history
Returns a paginated list of your past optimization runs.
curl "https://optimizerapi.sysgadh.com/history?page=1&per_page=20" \
-H "Authorization: Bearer cutopt_YOUR_API_KEY"/history/{run_id}Get run detail
Returns the full input data and result for a specific run.
curl https://optimizerapi.sysgadh.com/history/7c9e6679... \
-H "Authorization: Bearer cutopt_YOUR_API_KEY"/history/{run_id}/reoptimize-1dRe-optimize 1D Run
Re-runs an existing 1D job with updated inputs and overwrites its history.
curl -X POST https://optimizerapi.sysgadh.com/history/7c9e6679.../reoptimize-1d \
-H "Authorization: Bearer cutopt_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{...}'/history/{run_id}/reoptimize-2dRe-optimize 2D Run
Re-runs an existing 2D job with updated inputs and overwrites its history.
curl -X POST https://optimizerapi.sysgadh.com/history/8a1e6679.../reoptimize-2d \
-H "Authorization: Bearer cutopt_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{...}'/history/{run_id}/export-pdf-1d-summaryExport 1D Summary PDF
Downloads a PDF file containing the tabular summary of the 1D optimization.
curl -O -J https://optimizerapi.sysgadh.com/history/7c9e6679.../export-pdf-1d-summary \
-H "Authorization: Bearer cutopt_YOUR_API_KEY"/history/{run_id}/export-pdf-1d-diagramExport 1D Diagram PDF
Downloads a PDF file containing the bar cutting diagrams.
curl -O -J https://optimizerapi.sysgadh.com/history/7c9e6679.../export-pdf-1d-diagram \
-H "Authorization: Bearer cutopt_YOUR_API_KEY"/history/{run_id}/export-pdf-2d-summaryExport 2D Summary PDF
Downloads a PDF file containing the tabular summary of the 2D optimization.
curl -O -J https://optimizerapi.sysgadh.com/history/8a1e6679.../export-pdf-2d-summary \
-H "Authorization: Bearer cutopt_YOUR_API_KEY"/history/{run_id}/export-pdf-2d-diagramExport 2D Diagram PDF
Downloads a landscape PDF file containing the 2D sheet layout diagrams.
curl -O -J https://optimizerapi.sysgadh.com/history/8a1e6679.../export-pdf-2d-diagram \
-H "Authorization: Bearer cutopt_YOUR_API_KEY"/history/{run_id}/export-dxf-2dExport 2D DXF
Downloads a DXF CAD file containing the 2D sheet layouts.
curl -O -J https://optimizerapi.sysgadh.com/history/8a1e6679.../export-dxf-2d \
-H "Authorization: Bearer cutopt_YOUR_API_KEY"/history/{run_id}Delete a run
Permanently deletes an optimization run.
curl -X DELETE https://optimizerapi.sysgadh.com/history/7c9e6679... \
-H "Authorization: Bearer cutopt_YOUR_API_KEY"Error Codes
All errors return JSON with a detail field.
| Code | Meaning | When it happens |
|---|---|---|
401 | Unauthorized | Missing or invalid API key / session expired |
400 | Bad Request | Invalid request body (e.g. empty stock list, exceeded limits) |
404 | Not Found | Job ID or resource does not exist for your account |
422 | Validation Error | Request body fails schema validation — check field types |
429 | Too Many Requests | Rate limit exceeded — slow down requests |
500 | Server Error | Unexpected server error — retry after a few seconds |
// All error responses follow this shape:
{
"detail": "Not authenticated"
}