api.autotunempc.com/v1/templates/autotune
Call this when the plant is differential_drive, battery_peak_shaving, or root_zone_irrigation and Optuna should tune that registered template. Send name and max_trials. The reply returns the tuned weights for that template. Send header X-API-Key from the $29 pack, or pay the HTTP 402 x402 challenge. A template run spends 2 autotune credits.
POST
https://api.autotunempc.com/v1/templates/autotuneUptime100% of 5 checks in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://api.autotunempc.com/v1/templates/autotune", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"max_trials":2,"name":"battery_peak_shaving"}),
});
console.log(await res.json());Example input
{
"max_trials": 2,
"name": "battery_peak_shaving"
}