Wheel of Chance

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

120 requests per minute

Endpoints

1 endpoint available

Overview

Pick one winner from a list of options. The pick uses the server's crypto-secure random generator, so every option has exactly the same chance.

Notes

  • Send 2 to 500 options. Each is trimmed and must be 1 to 200 characters.
  • Duplicate options are allowed and count as separate slices of the wheel.
  • winnerIndex is the zero-based position of the winner in the list you sent.

Endpoints

POST
https://opentools.ca/api/v1/tools/wheel-of-chance
Pick one option from a list at random

Request Body

Content-Type: application/json

ParameterTypeRequiredDescription
options
string[]
Required
The options to choose from. At least 2 and at most 500, each 1 to 200 characters.

Response Example

{
  "success": true,
  "winner": "Bob",
  "winnerIndex": 1,
  "totalOptions": 4
}

Error Codes

400
Bad Request - Fewer than 2 options, too many options, or an empty or overlong option
401
Unauthorized - Invalid or missing API key
403
Forbidden - API key inactive, expired, or request from a disallowed IP
429
Too Many Requests - Rate limit exceeded
500
Internal Server Error

Code Examples

curl -X POST https://opentools.ca/api/v1/tools/wheel-of-chance \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"options": ["Alice", "Bob", "Charlie", "Diana"]}'

Ready to get started?

Create an API key to start using the Wheel of Chance API.

Rather use it in your browser? Open the Wheel of Chance