Powered by Stockfish 17 lite NNUE. Free API access is available; paid subscriptions are not enabled.

Documentation / Guides

Annotate PGNs in CI

a GitHub Action that evaluates every game in a repo

Workflow

name: analyze games
on: [push]
jobs:
  analyze:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: |
          for f in games/*.pgn; do
            curl -s https://stockfishapi.com/v1/analyze \
              -H "Authorization: Bearer ${{ secrets.STOCKFISH_API_KEY }}" \
              -H "Content-Type: application/json" \
              -d "$(jq -n --rawfile pgn "$f" '{pgn:$pgn, depth:18}')" > "${f%.pgn}.json"
          done
      - uses: actions/upload-artifact@v4
        with: { name: analysis, path: games/*.json }

/analyze returns a job id (202) once the async pipeline ships; until then loop over positions with /eval. Price a game first: GET /v1/price?endpoint=analyze&depth=18&plies=80.

Get a key with one call: POST /v1/signup {"email":"you@example.com"}. Free plan, depth 14, 2,000 units a day.