Chess move legality, SAN/UCI conversion and next FEN

$0.005 USDC per call · Business, finance and compliance · POST /api/v1/chess-move · Id chess-move

Checks whether a move (or a sequence of moves) is legal from a FEN position under the FIDE Laws of Chess, for agents that play, annotate or verify chess games. Accepts UCI or SAN, returns the normalized move, the new FEN, check / checkmate / stalemate / insufficient-material flags and, if asked, every legal move; an illegal move names the reason (castling_through_check, ep_exposes_king, moves_into_check, blocked, bad_promotion). Does NOT suggest or evaluate moves, detect threefold repetition (no game history), detect dead positions other than insufficient material, or support Chess960 (reported as unsupported).

What you get

Up to 50 positions per $0.005 call; a move an agent believes is legal is verified by a complete legal-move generator, not a model.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/chess-move. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/chess-move \
  -H 'content-type: application/json' \
  -d '{"items":[{"fen":"startpos","moves":["e4","e5","Nf3"],"expectFen":"rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2"},{"fen":"4k3/8/8/8/8/8/5r2/4K2R w K - 0 1","move":"O-O"}]}'

Input

FieldTypeRequiredDescription
itemsarray<object>; max 50 itemsyes1 to 50 positions, at most 400 moves in total.

Example request body

{
  "items": [
    {
      "fen": "startpos",
      "moves": [
        "e4",
        "e5",
        "Nf3"
      ],
      "expectFen": "rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2"
    },
    {
      "fen": "4k3/8/8/8/8/8/5r2/4K2R w K - 0 1",
      "move": "O-O"
    }
  ]
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
resultsarray<object>noOne entry per input item, in order.
summaryobjectno
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the creative-games-kit package.

Machine-readable