POST /v1/solve
$0.02 USD
One constrained MPC step. Send X-API-Key or pay the HTTP 402 challenge.
CasADi and IPOPT solve the constrained nonlinear program. Optuna tunes the weights. One JSON API covers the solve, the tuner, and three registered plants.
Illustration of a step response. It is not a recorded solve.
These bodies match the current schemas. The three plants are the systems DifferentialDriveRobotTemplate, BatteryPeakShavingTemplate, and RootZoneIrrigationTemplate compile for POST /v1/validate. The solve body is a POST /v1/solve request, which the validator also accepts. Edit the JSON and run it.
The formatted JSON response appears here.
POST /v1/solve$0.02 USD
One constrained MPC step. Send X-API-Key or pay the HTTP 402 challenge.
POST /v1/autotune$1.50 USD
Queue an Optuna search. The response includes job_id and, when enforcement is on, job_token.
POST /v1/templates/autotune$2.00 USD
name is differential_drive, battery_peak_shaving, or root_zone_irrigation.
free GET /health returns {"status":"ok"}. free POST /v1/validate checks the plant before a paid solve.
curl -sS -X POST https://api.autotunempc.com/v1/solve \
-H 'content-type: application/json' \
-H 'X-API-Key: YOUR_KEY' \
-d '{"system":{"kind":"nonlinear","name":"double_integrator","parameters":{"dt":0.1},"N":8,"u_min":[-2.0],"u_max":[2.0],"du_min":[-1.0],"du_max":[1.0]},"x0":[0.0,0.0],"x_ref":[0.4,0.0],"Q":[[10.0,0.0],[0.0,2.0]],"R":[[0.1]],"Rd":[[0.1]],"Qf":[[20.0,0.0],[0.0,4.0]]}'
import requests
response = requests.post(
"https://api.autotunempc.com/v1/solve",
headers={"X-API-Key": "YOUR_KEY"},
json={
"system": {"kind": "nonlinear", "name": "double_integrator", "parameters": {"dt": 0.1}, "N": 8, "u_min": [-2.0], "u_max": [2.0], "du_min": [-1.0], "du_max": [1.0]},
"x0": [0.0, 0.0],
"x_ref": [0.4, 0.0],
"Q": [[10.0, 0.0], [0.0, 2.0]],
"R": [[0.1]],
"Rd": [[0.1]],
"Qf": [[20.0, 0.0], [0.0, 4.0]],
},
)
print(response.status_code)
print(response.json())
curl -sS -X POST https://api.autotunempc.com/v1/autotune \
-H 'content-type: application/json' \
-H 'X-API-Key: YOUR_KEY' \
-d '{"system":{"kind":"nonlinear","name":"double_integrator","parameters":{"dt":0.1},"N":8},"scenario":{"x0":[0.0,0.0],"step_reference":[1.0,0.0],"n_steps":20},"kpi":{"target_max_overshoot_pct":20,"settling_time_weight":1,"control_effort_weight":0.01,"slew_penalty_weight":0.01,"max_optuna_trials":8,"timeout_seconds":30}}'
import requests
response = requests.post(
"https://api.autotunempc.com/v1/autotune",
headers={"X-API-Key": "YOUR_KEY"},
json={
"system": {"kind": "nonlinear", "name": "double_integrator", "parameters": {"dt": 0.1}, "N": 8},
"scenario": {"x0": [0.0, 0.0], "step_reference": [1.0, 0.0], "n_steps": 20},
"kpi": {
"target_max_overshoot_pct": 20,
"settling_time_weight": 1,
"control_effort_weight": 0.01,
"slew_penalty_weight": 0.01,
"max_optuna_trials": 8,
"timeout_seconds": 30,
},
},
)
print(response.status_code)
print(response.json())
curl -sS -X POST https://api.autotunempc.com/v1/templates/autotune \
-H 'content-type: application/json' \
-H 'X-API-Key: YOUR_KEY' \
-d '{"name":"differential_drive","max_trials":2}'
curl -sS -X POST https://api.autotunempc.com/v1/templates/autotune \
-H 'content-type: application/json' \
-H 'X-API-Key: YOUR_KEY' \
-d '{"name":"battery_peak_shaving","max_trials":2}'
curl -sS -X POST https://api.autotunempc.com/v1/templates/autotune \
-H 'content-type: application/json' \
-H 'X-API-Key: YOUR_KEY' \
-d '{"name":"root_zone_irrigation","max_trials":2}'
import requests
for name in ("differential_drive", "battery_peak_shaving", "root_zone_irrigation"):
response = requests.post(
"https://api.autotunempc.com/v1/templates/autotune",
headers={"X-API-Key": "YOUR_KEY"},
json={"name": name, "max_trials": 2},
)
print(name, response.status_code)
print(response.json())
$29.00 USD
One-time payment. No subscription. The key is digital and available as soon as checkout completes.
POST /v1/solve spends 1.POST /v1/autotune spends 1.POST /v1/templates/autotune spends 2 autotune credits.The pack is those two counters. It is not a mixed dollar wallet. After checkout, the success page shows the key.
Pay per call when a pack key has no credits left, or when you do not send a key.
/v1/solve $0.02 USD/v1/autotune $1.50 USD/v1/templates/autotune $2.00 USDEmail kaidenfield898@gmail.com.
After checkout, the success page shows the key.