{"name":"Ultimate Random Chess v2 API","version":"2.0.0","engine":"Fairy-Stockfish (config-only Betza variants, no fork)","pieces":100,"perGame":5,"maxTypesPerVariant":20,"rules":"Standard 8x8 chess with a randomised back rank: king between two rooks (Chess960 castling), the other five squares hold five distinct random fairy pieces, mirrored for both sides. Pawns promote to queen/rook/bishop/knight or any fairy piece in the game.","moves":"UCI long algebraic (e2e4, e7e8q). Castling is king-takes-own-rook (e.g. e1h1). FEN castling rights are Chess960 file letters (e.g. GBgb).","gameObject":{"youAre":"white|black in engine mode (you play the colour the engine does not), null otherwise","yourTurn":"boolean in engine mode","turn":"w|b side to move","inCheck":"side to move is in check","board":"8 rows of ASCII, rank 8 first; uppercase = white","legend":"letter -> piece name and Betza","pieces":"the 5 fairy pieces of this game with their letters","variant":"the compiled Fairy-Stockfish ini section (tag, letters, ini)","fen":"current position (Fairy-Stockfish FEN)","startFen":"opening position","moves":"UCI moves so far","fens":"position after each ply","ply":"moves.length","legalMoves":"[{uci, from, to, piece, capture, captured, castle, promotion}] for the side to move (empty when finished)","lastMove":"last move played incl. by: player|engine","played":"on move responses: the move you just made","engineMove":"only on responses where the engine just moved: uci, score {cp|mate} from the engine side, depth, nodes, timeMs, pv","status":"active|finished","result":"1-0|0-1|1/2-1/2","winner":"w|b|null","reason":"checkmate|stalemate|resignation|threefold repetition|50-move rule|bare kings|400-ply limit","openingEval":"fairness filter result for the chosen start position (cp from white, number of rejected back ranks)"},"defaults":"engine depth 10 (1..16) unless movetime 50..5000 ms is given; invalid values are rejected with 400, not clamped","endpoints":{"GET /pieces":"the 100-piece library (betza, family, blurb, mobility, reach, images: Staunton PNGs with alpha, 1024 and 128 px, white and black)","GET /pieces/:id":"one piece","GET /pieces/library.ini":"the whole library as Fairy-Stockfish variants.ini sections (20 pieces per section) for local use","POST /games":"{ pieces?: [ids ≤5], seed?, mode?: engine|pvp|engine-vs-engine, color?: white|black|random, depth?: 1-16, movetime?: ms } → game with legalMoves; in engine mode the engine plays the other colour","GET /games":"recent games, newest first (?limit=1..50)","GET /games/:id":"game state + legalMoves","POST /games/:id/move":"{ move: \"e2e4\" } → applies your move (echoed as `played`), then the engine replies (`engineMove`) if it is its turn; an illegal move is a 400 carrying the legal list","POST /games/:id/engine-move":"{ depth?, movetime? } → engine moves for the side to move (any mode)","POST /games/:id/resign":"{ color?: white|black } (defaults to side to move)","POST /engine/variant":"{ pieces: [ids] } → compiled variants.ini section + letter map","POST /engine/legal":"{ pieces: [ids], fen } → legal moves (the position must be legal: one king each, no pawns on ranks 1/8, side not to move not in check)","POST /engine/bestmove":"{ pieces: [ids], fen, depth? | movetime? } → bestmove + score","GET /health":"engine + store status"},"docs":"https://api.ultimaterandomchess.com/v2/","example":"curl -X POST https://api.ultimaterandomchess.com/v2/games -H 'content-type: application/json' -d '{\"color\":\"white\",\"depth\":8}'"}