# Chess402 Stockfish Cloud Evaluation

> Chess402 Stockfish Cloud Evaluation is a paid API for AI agents from chess402.vercel.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Returns Stockfish engine evaluation (depth, score, and principal variation) for a given FEN position using Lichess's cached cloud evaluation database.

## Facts

- Endpoint: POST https://chess402.vercel.app/api/cloud-eval
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chess402-vercel-app-6dc16e11
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_V7eyqHSHmqDTpJ5wAc7vp

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 chess402-vercel-app-6dc16e11 -d '<json body>'
```

Example prompt: Can you get the Stockfish cloud evaluation for this FEN position: 'rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1'? I want to know the depth, score, and the principal variation Lichess has cached for it.

## When to prefer this

Use this endpoint when you need fast, pre-cached Stockfish engine evaluations for common chess positions without running a full local engine. Ideal for positions likely to appear in Lichess's cloud cache (opening theory, well-known endgames, master-level games). Not suitable for highly obscure or custom positions that are unlikely to be cached.

## Known failure modes

- Position not in Lichess cloud cache — no cached evaluation available for this specific FEN
- Invalid FEN string — malformed position returns an error
- Payment failure — x402 micropayment not completed or insufficient USDC balance
- Rate limiting — too many requests in a short time window
- Timeout — Lichess upstream API unavailable

## How this service works

Stockfish cloud evaluation for a FEN position. Returns depth, evaluation, and principal variation(s) when Lichess has the position cached.

## Output

Returns the Stockfish engine evaluation cached by Lichess for the given FEN position, including: search depth, centipawn or mate evaluation score, and one or more principal variation lines (best move sequences).

## Example request

```json
{
 "input": {
  "body": {
   "fen": "rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1",
   "multiPv": 1,
   "variant": "standard"
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "fen": {
   "type": "string",
   "maxLength": 100,
   "minLength": 15,
   "description": "Standard FEN position string, e.g. 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1'"
  },
  "multiPv": {
   "type": "integer",
   "maximum": 5,
   "minimum": 1,
   "description": "Number of principal variations to return (1-5). Default 1."
  },
  "variant": {
   "enum": [
    "standard",
    "chess960",
    "crazyhouse",
    "antichess",
    "atomic",
    "horde",
    "kingOfTheHill",
    "racingKings",
    "threeCheck"
   ],
   "type": "string",
   "description": "Chess variant. Default 'standard'."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
  "pvs": [
   {
    "cp": 27,
    "moves": "e2e4 c7c5 g1f3 d7d6 d2d4 c5d4"
   }
  ],
  "depth": 22,
  "knodes": 13683
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chess402-vercel-app-6dc16e11/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chess402.vercel.app](https://www.zero.xyz/host/chess402.vercel.app/llms.txt)
