Referencia de la API
URL base https://api.cutoptim.com · versión del contrato v1
Crea una clave en tu panel y luego envíala como Authorization: Bearer <key>.
▶ Prueba la API en vivo — sin registroUsa una clave de demostración pública — limitada, solo trabajos pequeños, nunca se factura.
Integraciones
GuíasEN
ConceptosEN
Endpoints
| Método | Ruta | Descripción |
|---|---|---|
| POST | /v1/optimize/2d | optimización de paneles 2D |
| POST | /v1/optimize/1d | optimización 1D / lineal (barras, perfiles, tubo) |
| POST | /v1/optimize/wood | optimización de madera — 1D con emparejamiento por sección transversal |
| POST | /v1/optimize/nest | anidado de forma real — polígonos irregulares en tableros fijos, con zonas de exclusión (láser / plasma / chorro de agua) |
| POST | /v1/validate/2d | validar una solicitud sin resolver — gratis, sin clave, sin cuota (2d / 1d / wood / nest) |
| POST | /v1/validate/1d | validar una solicitud sin resolver — gratis, sin clave, sin cuota (2d / 1d / wood / nest) |
| POST | /v1/validate/wood | validar una solicitud sin resolver — gratis, sin clave, sin cuota (2d / 1d / wood / nest) |
| POST | /v1/validate/nest | validar una solicitud sin resolver — gratis, sin clave, sin cuota (2d / 1d / wood / nest) |
| GET | /v1/jobs/{id} | sondear un trabajo asíncrono del motor max — devuelve su status y, una vez terminado, el plan (sin cuota; solo tus propios trabajos) |
| POST | /v1/import/nest | lee los contornos de las piezas de un archivo SVG o DXF — requiere clave, no consume cuota |
| GET | /v1/usage | el uso y la cuota del mes en curso de la CUENTA (todas las claves comparten una) |
| GET | /v1/health | liveness — sin clave, sin límite de tasa, sin base de datos |
POST /v1/validate/{2d,1d,wood,nest} — response
The request is well-formed. No solve ran and no quota was spent.
| Campo | Tipo | Descripción |
|---|---|---|
| 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). |
Especificación OpenAPI
Un documento OpenAPI 3.1 legible por máquina describe los doce endpoints, cada cuerpo de solicitud, cada estructura de respuesta y cada error. Apunta tu generador de clientes a él en lugar de transcribir esta página. El documento en sí está solo en inglés: se compone de tokens del contrato, y OpenAPI no tiene mecanismo de localización.
curl -s https://cutoptim.com/engine/openapi.json > cutoptim-engine.jsonAbrir el documento 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.