{"uid":"cap_QuiJfbzCVAmP8zUSNSIt1","slug":"writerslogic-chess-move-legality-validator-e7f0f331","name":"WritersLogic Chess Move Legality Validator","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/chess-move?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","required":["fen"],"properties":{"fen":{"type":"string","maxLength":100,"description":"Position as a 6-field FEN, or \"startpos\"."},"list":{"type":"boolean","description":"Also return every legal move (UCI and SAN) in the final position. At most 20 items per call."},"move":{"type":"string","maxLength":16,"description":"One move to check from the position, UCI (e2e4, e7e8q, e1g1) or SAN (Nf3, exd5, e8=Q, O-O)."},"moves":{"type":"array","items":{"type":"string","maxLength":16,"description":"UCI or SAN move."},"maxItems":200,"description":"Moves played one after another from the position; stops at the first that is not legal. Use either move or moves."},"expectFen":{"type":"string","maxLength":100,"description":"Optional claim: the FEN you expect after the move(s). Compared on placement, side, castling and capturable en passant (4 or 6 fields)."}},"additionalProperties":false},"maxItems":50,"minItems":1,"description":"1 to 50 positions, at most 400 moves in total."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_lhsjw9Do0ovC1aymwAVnw","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates whether a chess move or sequence of moves is legal from a given FEN position, returning the resulting FEN, game-state flags, and optional list of all legal moves","exampleAgentPrompt":"Is 1.e4 e5 2.Nf3 legal starting from startpos? If so, give me the resulting FEN and also list all legal moves from that final position.","exampleUseCases":[{"title":"Chess game annotation pipeline","prompt":"I'm annotating a PGN game and need to verify that this sequence of moves is legal starting from the opening position: e2e4, e7e5, g1f3, b8c6, f1c4. Give me the resulting FEN after each move and flag any illegal ones with the reason."},{"title":"Checkmate detection in puzzle app","prompt":"From the FEN 'r1bqkb1r/pppp1ppp/2n2n2/4p3/2B1P3/5N2/PPPP1PPP/RNBQK2R w KQkq - 4 4', is the move Bxf7+ legal? Tell me if it results in check, and what the new position is."},{"title":"Validate student's claimed board state","prompt":"A student claims that after playing O-O from the FEN 'r1bqk2r/pppp1ppp/2n2n2/2b1p3/2B1P3/5N2/PPPP1PPP/RNBQK2R w KQkq - 4 5', the resulting FEN is 'r1bqk2r/pppp1ppp/2n2n2/2b1p3/2B1P3/5N2/PPPP1PPP/RNBQ1RK1 b kq - 5 5'. Can you verify if the move is legal and whether the expected FEN matches?"}],"resultDescription":"Returns per-position results including: whether each move is legal, the normalized move in UCI and SAN, the resulting FEN after the move(s), boolean flags for check/checkmate/stalemate/insufficient material, the reason code if a move is illegal (e.g. castling_through_check, ep_exposes_king, moves_into_check, blocked, bad_promotion), and optionally the full list of legal moves in UCI and SAN from the final position.","failureModes":["Invalid or malformed FEN returns a parse error","Ambiguous SAN move that cannot be resolved returns an error","Chess960 positions are explicitly reported as unsupported","More than 50 positions or 400 total moves per request returns a validation error","Threefold repetition cannot be detected (no game history is tracked)","Dead positions other than insufficient material are not flagged"],"whenToPreferThis":"Use this endpoint when you need deterministic, rule-based chess move legality checking under standard FIDE rules — not evaluation or suggestions. Ideal for game annotation pipelines, chess puzzle validators, move-by-move game replay verification, or any agent that needs to confirm move legality and board state without an embedded chess engine. Prefer this over general-purpose chess engines when you need explicit illegality reason codes and do not need position evaluation or move recommendations.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T00:32:44.477Z","isFirstParty":false,"canonicalSlug":"writerslogic-chess-move-legality-validator-e7f0f331"}