# Chess FEN Validator

> Chess FEN Validator is a paid API for AI agents from chess-notation.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Validates a chess FEN string by checking syntax of all six fields, king and pawn counts, castling rights, en passant consistency, and piece totals.

## Facts

- Endpoint: GET https://chess-notation.x402tookit.com/fen-parse?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chess-fen-validator-ffc1cc22
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nfroJ117Pa6qDUbw7DLMq

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-fen-validator-ffc1cc22
```

Example prompt: Can you validate this chess FEN for me and tell me if it's legal — rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1 — and flag any problems?

## When to prefer this

Choose this endpoint when you need to programmatically verify that a FEN string is both syntactically well-formed and logically legal before passing it to a chess engine, storing it in a database, or displaying it to users. It is more thorough than a simple regex check because it also validates semantic constraints like king counts, pawn limits, castling eligibility, and en passant square consistency.

## Known failure modes

- Missing or malformed FEN query parameter returns an error
- FEN with fewer than 6 space-separated fields fails syntax check
- Invalid piece placement characters cause parse failure
- Positions with zero or multiple kings per side flagged as invalid
- En passant target square inconsistent with side to move flagged
- Service degraded flag returned when partial validation only is possible

## How this service works

Validate a chess FEN: syntax of all six fields, king and pawn counts, castling and en passant consistency, piece totals.

## Output

Returns a validity boolean, a verdict string, a human-readable summary, a list of detected problems and reasons for failure, castling availability flags for both sides, side to move, halfmove clock, fullmove number, per-side piece counts (kings, queens, rooks, bishops, knights, pawns), total piece counts, and an array of fields not checked.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "fen"
     ],
     "properties": {
      "fen": {
       "type": "string",
       "description": "A FEN string, for example the start position rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "black": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "kings": {
         "type": [
          "null",
          "number"
         ]
        },
        "pawns": {
         "type": [
          "null",
          "number"
         ]
        },
        "rooks": {
         "type": [
          "null",
          "number"
         ]
        },
        "queens": {
         "type": [
          "null",
          "number"
         ]
        },
        "bishops": {
         "type": [
          "null",
          "number"
         ]
        },
        "knights": {
         "type": [
          "null",
          "number"
         ]
        }
       }
      },
      "valid": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "white": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "kings": {
         "type": [
          "null",
          "number"
         ]
        },
        "pawns": {
         "type": [
          "null",
          "number"
         ]
        },
        "rooks": {
         "type": [
          "null",
          "number"
         ]
        },
        "queens": {
         "type": [
          "null",
          "number"
         ]
        },
        "bishops": {
         "type": [
          "null",
          "number"
         ]
        },
        "knights": {
         "type": [
          "null",
          "number"
         ]
        }
       }
      },
      "source": {
    
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chess-fen-validator-ffc1cc22/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chess-notation.x402tookit.com](https://www.zero.xyz/host/chess-notation.x402tookit.com/llms.txt)
