Skip to content
ToolsOnDuty - free online tools
ToolsOnDuty / docs
Browse documentation

Reference / Games

Games API

12 endpoints for games workflows. Every call requires bearer authentication and uses the standard ToolsOnDuty response envelope.

Try it

Runs a real request from your browser to your own ToolsOnDuty account. Your key is only kept in this page and is never stored.

POST/v1/games/chess-move1 credit / call

Chess move validator

Validate SAN or coordinate chess moves from the start position or a supplied FEN.

ParameterTypeRequiredDescription
movestringYesSAN or coordinate move, e.g. e4 or e2e4.
fenstringNoOptional FEN position.

Request

curl -X POST https://toolsonduty.com/api/v1/games/chess-move \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"move":"e2e4"}'

Response

{
  "ok": true,
  "data": {
    "legal": true,
    "san": "e4",
    "from": "e2",
    "to": "e4"
  }
}
POST/v1/games/scrabble-score1 credit / call

Scrabble word scorer

Calculate English Scrabble base tile points with a letter breakdown.

ParameterTypeRequiredDescription
wordstringYesWord to score.

Request

curl -X POST https://toolsonduty.com/api/v1/games/scrabble-score \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"word":"quiz"}'

Response

{
  "ok": true,
  "data": {
    "word": "QUIZ",
    "score": 22
  }
}
POST/v1/games/bingo-card1 credit / call

Bingo card generator

Securely shuffle supplied labels into a 3x3 to 7x7 bingo card.

ParameterTypeRequiredDescription
itemsstringYesOne unique square label per line.
sizenumberNoCard width and height. Default: 5.
freeCenterbooleanNoPlace FREE in the center of odd-sized cards. Default: true.

Request

curl -X POST https://toolsonduty.com/api/v1/games/bingo-card \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"items":"Item 1\nItem 2\n...","size":5}'

Response

{
  "ok": true,
  "data": {
    "size": 5,
    "cells": []
  }
}
POST/v1/games/boggle-board1 credit / call

Boggle board generator

Generate a securely randomized letter board with English-like letter frequencies.

ParameterTypeRequiredDescription
sizenumberNoBoard width and height. Default: 4.

Request

curl -X POST https://toolsonduty.com/api/v1/games/boggle-board \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"size":4}'

Response

{
  "ok": true,
  "data": {
    "size": 4,
    "rows": []
  }
}
POST/v1/games/card-deck1 credit / call

Card deck shuffler

Generate and cryptographically shuffle one to eight standard 52-card decks.

ParameterTypeRequiredDescription
decksnumberNoNumber of standard decks. Default: 1.

Request

curl -X POST https://toolsonduty.com/api/v1/games/card-deck \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"decks":1}'

Response

{
  "ok": true,
  "data": {
    "count": 52,
    "cards": []
  }
}
POST/v1/games/coin-flip1 credit / call

Coin flipper

Generate one or more cryptographically random heads-or-tails results.

ParameterTypeRequiredDescription
countnumberNoNumber of flips. Default: 1.

Request

curl -X POST https://toolsonduty.com/api/v1/games/coin-flip \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"count":3}'

Response

{
  "ok": true,
  "data": {
    "results": [
      "heads",
      "tails",
      "heads"
    ]
  }
}
POST/v1/games/dice-roll1 credit / call

Dice roller

Roll configurable fair dice using Web Crypto rejection sampling.

ParameterTypeRequiredDescription
countnumberNoNumber of dice. Default: 2.
sidesnumberNoSides per die. Default: 6.

Request

curl -X POST https://toolsonduty.com/api/v1/games/dice-roll \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"count":2,"sides":6}'

Response

{
  "ok": true,
  "data": {
    "rolls": [
      3,
      5
    ],
    "total": 8
  }
}
POST/v1/games/lottery-numbers1 credit / call

Lottery number generator

Generate sorted unique random numbers from a configurable inclusive range.

ParameterTypeRequiredDescription
countnumberNoNumber of unique values. Default: 6.
minnumberNoInclusive minimum. Default: 1.
maxnumberNoInclusive maximum. Default: 49.

Request

curl -X POST https://toolsonduty.com/api/v1/games/lottery-numbers \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"count":6,"min":1,"max":49}'

Response

{
  "ok": true,
  "data": {
    "numbers": []
  }
}
POST/v1/games/maze1 credit / call

Maze generator

Generate a perfect square maze and return each cell's open directions.

ParameterTypeRequiredDescription
sizenumberNoMaze width and height. Default: 10.

Request

curl -X POST https://toolsonduty.com/api/v1/games/maze \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"size":8}'

Response

{
  "ok": true,
  "data": {
    "size": 8,
    "cells": []
  }
}
POST/v1/games/rock-paper-scissors1 credit / call

Rock paper scissors

Play one round against a cryptographically random computer choice.

ParameterTypeRequiredDescription
choicestringYesrock | paper | scissors.

Request

curl -X POST https://toolsonduty.com/api/v1/games/rock-paper-scissors \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"choice":"rock"}'

Response

{
  "ok": true,
  "data": {
    "computer": "scissors",
    "result": "win"
  }
}
POST/v1/games/slot-machine1 credit / call

Slot machine simulator

Generate a cryptographically random, entertainment-only slot result with no wagering.

ParameterTypeRequiredDescription
reelsnumberNoNumber of reels. Default: 3.

Request

curl -X POST https://toolsonduty.com/api/v1/games/slot-machine \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"reels":3}'

Response

{
  "ok": true,
  "data": {
    "reels": [
      "cherry",
      "bell",
      "seven"
    ],
    "win": false
  }
}
POST/v1/games/word-scramble1 credit / call

Word scramble generator

Cryptographically shuffle the Unicode characters in a supplied word.

ParameterTypeRequiredDescription
wordstringYesWord to scramble.

Request

curl -X POST https://toolsonduty.com/api/v1/games/word-scramble \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"word":"planet"}'

Response

{
  "ok": true,
  "data": {
    "original": "planet",
    "scrambled": "netalp"
  }
}