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

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-chance
Randomly select one option from a list

Request Body

Content-Type: application/json

ParameterTypeRequiredDescription
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 provided
401
Unauthorized - Invalid or missing API key
429
Too Many Requests - Rate limit exceeded
500
Internal Server Error

Code 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"]
  }'

Ready to get started?

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