Powered by Stockfish 17 lite NNUE. Free API access is available; paid subscriptions are not enabled.
MultiPV
Asking the engine for the best N lines instead of one.
With multipv=3 the response contains the three best moves, each with its own evaluation and principal variation. It costs roughly three times a single-line search because each line has to be searched to full depth. Use it to show alternatives in a trainer, to detect only-moves (a big gap between line 1 and line 2), or to pick a plausible human move in a bot.
Example
curl -s https://stockfishapi.com/v1/eval \
-H "Authorization: Bearer $STOCKFISH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"fen":"r1bqk2r/ppp1bppp/2n2n2/3p4/2PP4/2N2N2/PP2PPPP/R1BQKB1R w KQkq - 4 5","depth":14}' const res = await fetch("https://stockfishapi.com/v1/eval", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.STOCKFISH_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"fen": "r1bqk2r/ppp1bppp/2n2n2/3p4/2PP4/2N2N2/PP2PPPP/R1BQKB1R w KQkq - 4 5",
"depth": 14
}),
});
const data = await res.json(); import os, requests
r = requests.post(
"https://stockfishapi.com/v1/eval",
headers={"Authorization": f"Bearer {os.environ['STOCKFISH_API_KEY']}"},
json={
"fen": "r1bqk2r/ppp1bppp/2n2n2/3p4/2PP4/2N2N2/PP2PPPP/R1BQKB1R w KQkq - 4 5",
"depth": 14
},
)
data = r.json()