Workflow
Multi-armed bandit pick API
Selects the next arm to pull via UCB1 or epsilon-greedy given each arm's pull and reward stats, returning per-arm means and exploration scores. Answers 'Which option should I try next?', 'How do I balance explore vs exploit?'.
Price$0.03per request
MethodPOST
Route/v1/workflow/bandit-pick
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
banditmulti-armeducb1epsilon-greedyexplore-exploitoptimizationselectionworkflow
API URL
Integration docshttps://x402.hexl.dev/v1/workflow/bandit-pickExample request
{
"arms": [
{
"name": "A",
"pulls": 10,
"reward": 6
},
{
"name": "B",
"pulls": 3,
"reward": 2
}
],
"strategy": "ucb1"
}Example response
{
"chosenArm": "B",
"strategy": "ucb1",
"armStats": [
{
"name": "A",
"pulls": 10,
"mean": 0.6
},
{
"name": "B",
"pulls": 3,
"mean": 0.666667
}
],
"scores": [
{
"name": "A",
"score": 1.316233
},
{
"name": "B",
"score": 1.974323
}
],
"interpretation": "Strategy ucb1 selected arm 'B'."
}Input schema
{
"type": "object",
"required": [
"arms"
],
"properties": {
"arms": {
"type": "array",
"examples": [
[
{
"name": "A",
"pulls": 10,
"reward": 6
},
{
"name": "B",
"pulls": 3,
"reward": 2
}
]
]
},
"strategy": {
"type": "string",
"enum": [
"epsilon-greedy",
"ucb1"
]
},
"epsilon": {
"type": "number"
},
"seed": {
"description": "Seed for epsilon-greedy explore draw"
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}