# Chess Best Move API (Stockfish)

> Chess Best Move API (Stockfish) is a paid API for AI agents from api.ruliad.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Analyzes a chess position given in FEN notation and returns the best move using the Stockfish engine at a specified depth

## Facts

- Endpoint: POST https://api.ruliad.xyz/api/best-move
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chess-best-move-api-stockfish-927b7c20
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZO1pVvc8387Af6ijBMyyN

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-best-move-api-stockfish-927b7c20 -d '<json body>'
```

Example prompt: Run a Stockfish analysis on this chess position — rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1 — at depth 15 and tell me the best move.

## When to prefer this

Use this endpoint when you need server-side Stockfish chess engine analysis without running a local engine — ideal for agents or apps that want to evaluate a chess position by FEN notation and receive a best-move recommendation at a configurable search depth

## Known failure modes

- Invalid FEN string returns an error or unexpected result
- Depth value too high may cause timeout or slow response
- Missing required 'fen' field returns a 400-level error
- Malformed JSON body causes request failure
- Payment not included or rejected causes 402 Payment Required

## How this service works

Get Stockfish chess analysis for any position

## Output

A JSON object containing the best move recommended by the Stockfish engine for the provided chess position, computed at the specified search depth

## Example request

```json
{
 "fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
 "depth": 10
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "fen": {
   "type": "string"
  },
  "depth": {
   "type": "number",
   "default": 10
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chess-best-move-api-stockfish-927b7c20/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.ruliad.xyz](https://www.zero.xyz/host/api.ruliad.xyz/llms.txt)
