Base Endpoints
GET /puzzles (API key or x402 payment)
x-api-key: your-key
Authorization: Bearer your-key
x-payment: signed-payment
payment-signature: signed-payment
Access Modes
- API key mode: use
GET /puzzleswith either key header. - x402 mode: use
GET /puzzlesand pay a dynamic total based oncount × $0.005per puzzle. - Supported networks:
BaseandCelo. - Supported stablecoins:
USDC,USDT,USDm. - Each puzzle object includes a
costfield (USD per puzzle unit). - Clients can send API key on
/puzzlesto skip payment.
Query Parameters
id: fetch one puzzle by ID (overrides filters)count: number of random puzzles to return (1-100)rating: exact value or range (example:1500,1200-1800)themes: JSON array (example:["fork","pin"])themesType:ANYorALLwhen multiple themes are sentplayerMoves: exact value or range (example:2,2-4)
Puzzle Semantics
- The FEN is the position before the opponent's move.
moves[0]is the opponent's move. Present the position to the player after applyingmoves[0]to the FEN.moves[1]is the start of the solution (the player's first move).- All player moves are "only moves": any other move would considerably worsen the player's position.
- Exception: mates in one can have several solutions. Any move that checkmates wins the puzzle.