Documentație API
URL de bază https://api.cutoptim.com · versiunea contractului v1
Creează o cheie în panoul de control, apoi trimite-o ca Authorization: Bearer <key>.
▶ Încercați API-ul live — fără înregistrareFolosește o cheie demo publică — limitată, doar lucrări mici, nu se facturează niciodată.
Integrări
GhiduriEN
ConcepteEN
Endpointuri
| Metodă | Cale | Descriere |
|---|---|---|
| POST | /v1/optimize/2d | optimizare 2D pentru panouri |
| POST | /v1/optimize/1d | optimizare 1D / liniară (bare, profile, țeavă) |
| POST | /v1/optimize/wood | optimizarea lemnului — 1D cu potrivirea secțiunii |
| POST | /v1/optimize/nest | nesting true-shape — poligoane neregulate pe plăci fixe, cu zone de excludere (laser / plasmă / jet de apă) |
| POST | /v1/validate/2d | validează o cerere fără s-o rezolve — gratuit, fără cheie, fără cotă (2d / 1d / wood / nest) |
| POST | /v1/validate/1d | validează o cerere fără s-o rezolve — gratuit, fără cheie, fără cotă (2d / 1d / wood / nest) |
| POST | /v1/validate/wood | validează o cerere fără s-o rezolve — gratuit, fără cheie, fără cotă (2d / 1d / wood / nest) |
| POST | /v1/validate/nest | validează o cerere fără s-o rezolve — gratuit, fără cheie, fără cotă (2d / 1d / wood / nest) |
| GET | /v1/jobs/{id} | interoghează o lucrare asincronă a motorului max — returnează status-ul ei și, odată finalizată, planul (fără cotă; doar propriile lucrări) |
| POST | /v1/import/nest | citește conturul pieselor dintr-un fișier SVG sau DXF — necesită o cheie, nu consumă cotă |
| GET | /v1/usage | consumul și cota CONTULUI în luna curentă |
| GET | /v1/health | verificare de disponibilitate — fără cheie, fără limitare de rată, fără bază de date |
POST /v1/validate/{2d,1d,wood,nest} — response
The request is well-formed. No solve ran and no quota was spent.
| Câmp | Tip | Descriere |
|---|---|---|
| valid | boolean | Always true on a 200 — a malformed request is a 400 with the exact bad field path (details.path) instead. The body is the SAME one the matching optimize endpoint takes. |
| mode | "2d" | "1d" | "wood" | "nest" | The endpoint you called. |
| contractVersion | string | Shape version. Currently "1". |
| engineEnabled | boolean | Nest only — whether the nesting engine is built into this deployment. Absent for the rectangular modes. |
| parts | { rows, total } | Part rows sent, and the total quantity after qty expansion. Check it against the part cap before you spend a call. |
| parts.rows | integer | Number of part rows sent. |
| parts.total | integer | Total quantity across all part rows (Σ qty). |
| stock | { rows, total } | The same for stock. |
| stock.rows | integer | Number of stock rows sent. |
| stock.total | integer | Total quantity across all stock rows (Σ qty). |
| warnings | string[] | Approximate, solve-free feasibility notes — e.g. a part that fits no stock (2D and nest: by bounding box; wood: no matching section long enough). Empty ⇒ every part fits some stock. Ignores trim/kerf/material (a shape check, not a solve). |
Specificația OpenAPI
Un document OpenAPI 3.1, procesabil automat, descrie toate cele douăsprezece endpointuri, fiecare corp de cerere, fiecare structură de răspuns și fiecare eroare. Îndreaptă generatorul tău de client către el, în loc să transcrii această pagină. Documentul în sine este doar în engleză: este alcătuit din tokenuri de contract, iar OpenAPI nu are niciun mecanism de localizare.
curl -s https://cutoptim.com/engine/openapi.json > cutoptim-engine.jsonDeschide documentul OpenAPI 3.1 →
- TypeScript
npm install @cutoptim/engine
GitHub · npm - Python
pip install cutoptim
GitHub · PyPI - PHP
composer require cutoptim/engine
GitHub · Packagist
A two-page summary of the Engine API — the four modes (2D, 1D, wood and true-shape nest), a request and response, determinism and pricing. Print-ready, with a QR back to the docs.