cURL
curl --request POST \ --url https://api.erna.ai/v1/solver/solve \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "variables": [ { "type": "bool", "name": "<string>" } ], "constraints": [ { "type": "linear", "terms": [ { "var": "<string>", "coeff": 123 } ], "op": "<=", "rhs": 123 } ], "options": { "timeLimitSeconds": 123, "solutionLimit": 123 } } '
{ "status": "OPTIMAL", "values": {}, "statistics": { "solveTimeMs": 123, "conflicts": 123, "branches": 123 }, "error": "<string>", "solutionInfo": "<string>", "softViolations": [ { "constraintId": "<string>", "violationAmount": 123, "targetValue": 123, "actualValue": 123 } ] }
Submit a pre-compiled CP-SAT constraint model for solving. This is a synchronous endpoint; the response contains the solution. Use this when you build the constraint model yourself with the dabke library.
OAuth2 access token or API key
Show child attributes
Solver result
OPTIMAL
FEASIBLE
INFEASIBLE
TIMEOUT
ERROR