Optimization
Submit a cutting optimization job
Validates the request synchronously, then enqueues the job for async processing. Returns 202 with a job ID and URLs for polling/streaming.
Authorization
apiKey X-API-Key<token>
API key with sk_ prefix
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.sawvant.com/v1/optimize" \ -H "Content-Type: application/json" \ -d '{ "parts": [ { "id": "shelf", "length": 600, "width": 400, "quantity": 8, "grain": "none" }, { "id": "bracket", "length": 300, "width": 200, "quantity": 4, "grain": "none" } ], "sheets": [ { "id": "mdf-18", "length": 2440, "width": 1220, "quantity": 0, "grain": "none" } ], "machine": { "blade_thickness": 3.2, "max_levels": 3, "cut_direction": "default" } }'{
"job_id": "453bd7d7-5355-4d6d-a38e-d9e7eb218c3f",
"status": "pending",
"poll_url": "/v1/jobs/550e8400-e29b-41d4-a716-446655440000",
"stream_url": "/v1/jobs/550e8400-e29b-41d4-a716-446655440000/stream"
}{
"error": "string"
}{
"error": "string"
}{
"error": "string"
}{
"error": "string"
}{
"error": "rate limit exceeded",
"limit": 0,
"remaining": 0,
"strategy": "fast"
}