Chess move legality, SAN/UCI conversion and next FEN
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
| Field | Type | Required | Description |
|---|---|---|---|
items | array<object>; max 50 items | yes | 1 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.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: 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. |
results | array<object> | no | One entry per input item, in order. |
summary | object | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always 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
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent