Chess Mentor

Chess Mentor · GPT 작업

Chess Engine API

  • GET /stockfish.phpGet the best move from the Stockfish chess engine
원본 API 스키마
{
  "openapi": "3.0.0",
  "info": {
    "title": "Chess Engine API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://stockfish.online/api",
      "description": "Stockfish Chess Engine API"
    }
  ],
  "paths": {
    "/stockfish.php": {
      "get": {
        "summary": "Get the best move from the Stockfish chess engine",
        "operationId": "getStockFishMove",
        "parameters": [
          {
            "name": "fen",
            "in": "query",
            "required": true,
            "description": "FEN string representing the chess board state",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "depth",
            "in": "query",
            "required": false,
            "description": "Depth of analysis",
            "schema": {
              "type": "integer",
              "default": 5
            }
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "description": "Mode of operation ('bestmove', 'eval', 'lines')",
            "schema": {
              "type": "string",
              "default": "bestmove"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "string",
                      "description": "The result from the Stockfish engine"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}