# Chess Move Validator

> Chess Move Validator is a paid API for AI agents from x402.forgemesh.io, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Validates whether a chess move is legal in a given FEN position and returns the resulting board state, capture info, and check status

## Facts

- Endpoint: POST https://x402.forgemesh.io/chess-move-validator
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chess-move-validator-9c84c02c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6_XRgbmM-kOnVU9cXQMgQ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability chess-move-validator-9c84c02c -d '<json body>'
```

Example prompt: Is the move Nf3 legal from the starting position, and if so, what's the FEN after it's played? Use the FEN 'start' and move 'Nf3'.

## When to prefer this

Use this endpoint when building chess bots or game UIs that need reliable, graceful handling of illegal move inputs — it returns a clear legal/illegal verdict rather than throwing errors, making it ideal for input validation in automated game pipelines. Prefer this over local chess libraries when you want a stateless, pay-per-call microservice without dependency management.

## Known failure modes

- Invalid FEN string returns a parse error or unclear board state
- Move provided in unrecognized notation returns illegal verdict
- Missing FEN field causes request rejection
- Network timeout for high-load scenarios

## How this service works

Check whether a chess move is legal in a given FEN position and get the board state after it: resulting FEN, capture info, and whether the move gives check. Illegal moves return a clear verdict instead of an error, so game bots can handle bad input gracefully.

## Output

Returns whether the move is legal, the resulting FEN string after the move is applied, capture information (if a piece was taken), and whether the move puts the opponent in check. Illegal moves return a clear verdict rather than an error, allowing game bots to handle bad input gracefully.

## Request schema (JSON Schema)

```json
{
 "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)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chess-move-validator-9c84c02c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.forgemesh.io](https://www.zero.xyz/host/x402.forgemesh.io/llms.txt)
