Uniform selection
Send only choices for equal-probability selection.
Send 2–100 JSON-compatible choices. Random Choice selects one using cryptographically secure server-side randomness. Add optional positive relative weights for weighted selection.
{
"choices": ["alpha", "beta", "gamma"],
"weights": [7, 2, 1]
}Use uniform selection when every choice should be equally likely, or provide relative weights when some options should be more likely than others.
Send only choices for equal-probability selection.
Add one positive weight per choice. Weights are relative and do not need to total 100.
Receive the selected value, its index, choice count, weighting details, and request ID.
{
"selected": "alpha",
"index": 0,
"weighted": true,
"choice_count": 3,
"selected_weight": 7,
"total_weight": 10,
"request_id": "rc_..."
}Choose between several otherwise acceptable actions.
Represent soft preferences without writing custom randomization logic.
Select one item from a bounded set as part of a larger agent workflow.