{"openapi":"3.1.0","info":{"title":"ChessVG board image API","version":"1.0.0","description":"Render any chess position (FEN piece placement) as a PNG or SVG image by URL. Free, no API key, CORS enabled, responses cached for a year. Use it to show a chess board to a user: build the URL and display it as an image.","contact":{"url":"https://chessvg.com/board-image-api"}},"servers":[{"url":"https://chessvg.com"}],"paths":{"/b/{placement}.{format}":{"get":{"operationId":"renderBoard","summary":"Render a chess board image","description":"The FEN piece placement goes in the path with its slashes unescaped, e.g. /b/rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR.png. Use 'start' for the starting position. A full URL-encoded FEN is also accepted; only the placement is drawn.","parameters":[{"name":"placement","in":"path","required":true,"schema":{"type":"string"},"description":"FEN piece placement (8 ranks separated by '/'), or 'start'."},{"name":"format","in":"path","required":true,"schema":{"type":"string","enum":["png","svg"]}},{"name":"theme","in":"query","required":false,"schema":{"type":"string","enum":["chesssolve","wood","green","ocean","coral","graphite","lavender","marble","sunset","emerald","rosewood","midnight"],"default":"chesssolve"},"description":"Base color theme."},{"name":"pieces","in":"query","required":false,"schema":{"type":"string","enum":["alpha","california","cardinal","dubrovny","fresca","gioco","governor","kosal","maestro","merida","spatial","staunty","tatiana"],"default":"merida"},"description":"Piece set."},{"name":"orientation","in":"query","required":false,"schema":{"type":"string","enum":["white","black"],"default":"white"},"description":"Side at the bottom."},{"name":"arrows","in":"query","required":false,"schema":{"type":"string","examples":["e2e4,g1f3","e2e4-ff0000"]},"description":"Comma-separated arrows as from+to squares, optional '-hex' color. Max 16."},{"name":"coords","in":"query","required":false,"schema":{"type":"string","enum":["1","0"],"default":"1"},"description":"Show coordinates."},{"name":"size","in":"query","required":false,"schema":{"type":"integer","minimum":128,"maximum":2048,"default":1024},"description":"PNG width/height in px."},{"name":"light","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-fA-F]{3,8}$"},"description":"Light square color, hex without '#'."},{"name":"dark","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-fA-F]{3,8}$"},"description":"Dark square color, hex without '#'."},{"name":"frame","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":64},"description":"Frame width."},{"name":"frameColor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-fA-F]{3,8}$"},"description":"Frame color."},{"name":"padding","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":256,"default":32},"description":"Padding around the frame."},{"name":"radius","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":128,"default":12},"description":"Frame corner radius."},{"name":"bg","in":"query","required":false,"schema":{"type":"string"},"description":"Background hex color, or 'none' for transparent."},{"name":"bg2","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-fA-F]{3,8}$"},"description":"Second gradient color (makes the background a gradient)."},{"name":"angle","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":360,"default":145},"description":"Gradient angle in degrees."}],"responses":{"200":{"description":"The board image.","content":{"image/png":{"schema":{"type":"string","format":"binary"}},"image/svg+xml":{"schema":{"type":"string"}}}},"400":{"description":"Invalid FEN placement or missing .png/.svg extension.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"docs":{"type":"string"}}}}}}}}}}}