ApiBandits
Create Bandit
Create a draft experiment in the caller's workspace.
Create a draft experiment in the caller's workspace.
Draft experiments serve no decisions until started via
POST /api/v1/bandits/{experiment_id}/status.
Authorization
HTTPBearer AuthorizationBearer <token>
In: header
Header Parameters
X-API-Key?string|null
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://api.levainlabs.com/api/v1/bandits" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "reward_type": "binary", "arms": [ { "name": "string" } ] }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"status": "string",
"reward_type": "string",
"reward_agg": "string",
"reward_wait_s": 0,
"default_reward": 0,
"history_mode": "string",
"history_days": 0,
"exploration_floor": 0,
"min_pulls_burn_in": 0,
"stopping_prob_threshold": 0,
"stopping_decision_budget": 0,
"winner_arm_id": "3a9d70a9-49f8-4da0-b873-6f729e3ddd73",
"stopped_reason": "string",
"created_at": "2019-08-24T14:15:22Z",
"started_at": "2019-08-24T14:15:22Z",
"ended_at": "2019-08-24T14:15:22Z",
"arms": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"payload": {},
"status": "string",
"created_at": "2019-08-24T14:15:22Z",
"retired_at": "2019-08-24T14:15:22Z"
}
]
}