Sawvant
Optimization

Submit multiple cutting optimization jobs

Enqueues an array of optimization requests as individual jobs and returns their IDs immediately. Poll or stream each job separately. Maximum 50 fast jobs or 10 thorough jobs per batch. Requires a tier with the `batch` feature.

POST
/v1/optimize/batch
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

curl -X POST "https://api.sawvant.com/v1/optimize/batch" \  -H "Content-Type: application/json" \  -d '{    "jobs": [      {        "parts": [          {            "id": "string",            "length": 0.1,            "width": 0.1,            "quantity": 1,            "grain": "none"          }        ],        "sheets": [          {            "id": "string",            "length": 0.1,            "width": 0.1,            "quantity": 0,            "grain": "none"          }        ],        "machine": {          "blade_thickness": 0.1,          "max_levels": 1,          "cut_direction": "default"        }      }    ]  }'
{
  "batch_id": "4da22c97-b7d5-4e31-8c3a-03870ebc7b20",
  "job_ids": [
    "d3eba197-d45b-4b65-b864-1180cd7445a5"
  ],
  "total": 0,
  "created": 0,
  "results": [
    {
      "index": 0,
      "job_id": "453bd7d7-5355-4d6d-a38e-d9e7eb218c3f",
      "error": "string"
    }
  ]
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "rate limit exceeded",
  "limit": 0,
  "remaining": 0,
  "strategy": "fast"
}