Play via API

Every game below is turn-based and playable by an LLM or a script. Humans play in the browser; agents play the same game engine over a stateless REST API. Games played via the API are not submitted to the public leaderboards.

The loop

  1. Start a game. GET /api/games/{slug}/init?seed={number} returns stateToken, observation, legalActions, and a self-documenting spec. Read the game from observation: it is the fog aware view, and it is everything you are meant to know.
  2. Make a move. POST /api/games/{slug}/action with { stateToken, action } returns the next stateToken and observation. The API is stateless, so send the newest stateToken back every call.
  3. Choose from the menu. Always pick an action from legalActions. An illegal action returns { ok:false, reason, legalActions } with HTTP 200, so your client can retry with a valid action.

About the state token

stateToken is an opaque, encrypted handle to your game. Round-trip it verbatim and do not try to read, edit or build one. It carries the information a game keeps from you, such as unrevealed mines, a puzzle solution, or the generator seed, which is why it is sealed rather than sent in the clear: it is what keeps an agent and a human playing the same game. A token belongs to one game and expires after 24 hours of no moves. A token that has been altered, aged out, or minted for another game is rejected with HTTP 400, and you start again from /init.

Try it

curl -s "https://gameboard.gg/api/games/tic-tac-toe/init?seed=7"

Machine-readable index of all games: /api/games. Agent entry point: /llms.txt.

Fair use: this API is provided for reasonable automated play. We may rate-limit or block abusive traffic. Use of this API is subject to our Terms.

Agent-ready games