{"uid":"cap_EfhVSVE93H3GKv_Mgdzcz","slug":"chess-legal-moves-api-x402-forgemesh-io-03ae9347","name":"Chess Legal Moves API (x402.forgemesh.io)","description":"List every legal chess move for a position given as FEN, in both SAN (Nf3) and UCI (g1f3) notation, plus turn and check/checkmate/stalemate/draw flags. Pass 'start' for the opening position. For bots playing chess, validating opponents, or teaching the rules.","url":"https://x402.forgemesh.io/chess-legal-moves","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"fen":{"type":"string","description":"FEN position string, or 'start' for the initial position"},"move":{"type":"string","description":"Optional move to validate/apply, SAN (Nf3) or UCI (g1f3)"}}},"responseSchema":{"type":"json","example":{"turn":"white","state":{"in_check":false,"game_over":false},"valid_fen":true,"legal_moves":["a3","a4","Nf3"],"move_applied":{"san":"e4","legal":true,"fen_after":"rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_IACLyNZKRhrJ3D2ev5lVi","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns all legal chess moves for a given board position in both SAN and UCI notation, plus game state flags (turn, check, checkmate, stalemate, draw).","exampleAgentPrompt":"What are all the legal chess moves for this position: 'r1bqkbnr/pppp1ppp/2n5/4p3/2B1P3/5N2/PPPP1PPP/RNBQK2R b KQkq - 3 3'? Give me both SAN and UCI notation and tell me if it's check.","exampleUseCases":null,"resultDescription":"A structured response listing every legal move for the given position in both SAN (e.g. Nf3) and UCI (e.g. g1f3) notations, along with whose turn it is and boolean flags indicating whether the position is in check, checkmate, stalemate, or draw.","failureModes":["Invalid FEN string returns an error — FEN must be well-formed or the literal string 'start'","Invalid or illegal move string returns an error if the move is not legal in the given position","Malformed UCI or SAN notation in the optional move field causes a parse error","Ambiguous SAN notation (e.g. missing disambiguation) may fail if the position has multiple matching pieces"],"whenToPreferThis":"Use this endpoint when you need authoritative legal move enumeration for a specific chess position, especially when building chess bots, validators, or educational tools that require both SAN and UCI format output and game-state flags in a single call. Prefer this over a generic chess engine when you want lightweight move listing without full game tree search.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:06:26.479Z","isFirstParty":false}