# chessjs.best API Documentation > `chessjs.best` provides a REST API for rendering interactive chessboards, computing bot moves, running deep engine position analysis, and generating coaching feedback. ## Base URL `https://chessjs.best` --- ## Endpoints ### 1. Interactive Board * **Endpoint:** `GET /api/v1/board`[cite: 1] * **Description:** Renders the standalone fullscreen interactive chessboard HTML[cite: 1]. * **Parameters:** * `moves` (optional, String | Array): Comma-separated move history in algebraic notation (e.g., `e2e4, e7e5`)[cite: 1]. * `color` / `orientation` (optional, String): Player side. Options: `white`, `black` (Default: `white`)[cite: 1]. * `mode` (optional, String): Play mode. Options: `bot` or other values (Default: `bot`)[cite: 1]. * `difficulty` (optional, String): Engine difficulty level. Options: `easy`, `medium`, `hard`, `grandmaster`, `master` (Default: `hard`)[cite: 1]. * `theme` (optional, String): Board color scheme. Options: `wood`, `emerald`, `classic` (Default: `wood`)[cite: 1]. * `lightColor` (optional, String): Custom CSS color for light squares (e.g., `#eadeca`). Must be used with `darkColor`[cite: 1]. * `darkColor` (optional, String): Custom CSS color for dark squares (e.g., `#2e7d32`). Must be used with `lightColor`[cite: 1]. ### 2. Board State * **Endpoint:** `GET /api/v1/state`[cite: 1] * **Description:** Returns JSON containing side to move, legal moves, and current board piece placement[cite: 1]. * **Parameters:** * `moves` (optional, String | Array): Comma-separated move history (e.g., `e2e4, e7e5`)[cite: 1]. ### 3. Bot Move Generation * **Endpoint:** `GET /api/v1/botmove`[cite: 1, 2] * **Description:** Computes and returns the AI bot's next move[cite: 1, 2]. * **Parameters:** * `moves` (optional, String | Array): Comma-separated move history[cite: 1, 2]. * `difficulty` (optional, String): Bot strength. Options: `easy`, `medium`, `hard`, `grandmaster`, `master` (Default: `hard`)[cite: 1, 2]. ### 4. Engine Analysis * **Endpoint:** `GET /api/v1/bestmove`[cite: 2] * **Description:** Runs deep engine analysis on the given position[cite: 2]. * **Parameters:** * `moves` (optional, String | Array): Comma-separated move history[cite: 2]. * `depth` (optional, Integer): Target search depth in plies (Default: `10`)[cite: 2]. ### 5. Coaching Feedback * **Endpoint:** `GET /api/v1/coachtext`[cite: 2] * **Description:** Returns coaching feedback and evaluation on a specific played move[cite: 2]. * **Parameters:** * `moveAlg` (REQUIRED, String): Move string to analyze in algebraic notation (e.g., `e2e4`)[cite: 2]. * `moves` (optional, String | Array): Comma-separated history of moves before this turn[cite: 2]. * `preMoveEval` (optional, Float): Position evaluation score prior to this move (Default: `0`)[cite: 2]. ### 6. Unified Route * **Endpoint:** `ALL /api/v1/`[cite: 2] * **Description:** Unified catch-all endpoint accepting query string or JSON POST body values[cite: 2]. * **Parameters:** * `type` (REQUIRED, String): Determines operation mode. Options: `board`, `html`, `botmove`[cite: 2]. * Accepts all parameters listed in individual endpoints above relevant to the selected operation type[cite: 2].