
Wheel of Chance API
Utilities
Spin a custom wheel to randomly select options with the ability to remove winners. Perfect for games, prizes, and decision-making.
Authentication
All API requests require a valid API key passed in the Authorization header as a Bearer token.
Rate Limit
100 requests per minute
Endpoints
1 endpoint available
Overview
The Wheel of Chance API provides random selection from a list of options, simulating a spinning wheel.
Features
- Random selection from provided options (minimum 2 required)
- Fair, cryptographically random selection
- Returns the winning option with its index
- Useful for automated prize drawings and decision-making
Use Cases
- Automated prize drawings and raffles
- Random assignment in applications
- Decision-making automation
- Game mechanics for random selection
Endpoints
POST
/v1/tools/wheel-of-chanceRandomly select one option from a list
Request Body
Content-Type: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
| options | array | Required | Array of option strings to choose from (minimum 2 required) |
Response Example
{
"success": true,
"data": {
"winner": "Option B",
"winnerIndex": 1,
"totalOptions": 4,
"options": [
"Option A",
"Option B",
"Option C",
"Option D"
]
}
}Error Codes
400
Bad Request - Missing options or less than 2 options provided401
Unauthorized - Invalid or missing API key429
Too Many Requests - Rate limit exceeded500
Internal Server ErrorCode Examples
curl -X POST https://api.opentools.ca/v1/tools/wheel-of-chance \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"options": ["Alice", "Bob", "Charlie", "Diana"]
}'