www.brainiac.software/api/v1/experimentation/bucket-assign
Stateless SHA-256 bucketing of unit ids into an experiment with traffic gating, ordered group shares and an optional layer, documented so any SDK can reproduce it. Docs: https://www.brainiac.software/api/experimentation/bucket-assign
POST
https://www.brainiac.software/api/v1/experimentation/bucket-assignUptime100% of 2 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://www.brainiac.software/api/v1/experimentation/bucket-assign", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"experiment":{"groups":[{"name":"control","share":0.5},{"name":"treatment","share":0.5}],"salt":"exp_checkout_v2","trafficShare":1},"layer":null,"unitIds":["user_42","user_43"]}),
});
console.log(await res.json());Example input
{
"experiment": {
"groups": [
{
"name": "control",
"share": 0.5
},
{
"name": "treatment",
"share": 0.5
}
],
"salt": "exp_checkout_v2",
"trafficShare": 1
},
"layer": null,
"unitIds": [
"user_42",
"user_43"
]
}