---
title: "Analyse with external engine"
method: POST
path: "/api/external-engine/{id}/analyse"
tags: ["External engine"]
---

# Analyse with external engine

`POST /api/external-engine/{id}/analyse`

**Endpoint: `https://engine.lichess.ovh/api/external-engine/{id}/analyse`**

Request analysis from an external engine.
Response content is streamed as [newline delimited JSON](#description/streaming-with-nd-json).
The properties are based on the [UCI specification](https://backscattering.de/chess/uci/#engine).
Analysis stops when the client goes away, the requested limit
is reached, or the provider goes away.

## Request body

- object
  - `clientSecret` string, required
  - `work` union, required
    - object
      - `movetime` integer, required — Amount of time to analyse the position, in milliseconds.
      - `sessionId` string, required — Arbitary string that identifies the analysis session. Providers may wish to clear the hash table between sessions.
      - `threads` integer, required — Number of threads to use for analysis.
      - `hash` integer, required — Hash table size to use for analysis, in MiB.
      - `multiPv` integer, required — Requested number of principal variations.
      - `variant` 'chess' | 'crazyhouse' | 'antichess' | 'atomic' | 'horde' | 'kingofthehill' | 'racingkings' | '3check', required
      - `initialFen` string, required — Initial position of the game.
      - `moves` string[], required — List of moves played from the initial position, in UCI notation.
    - object
      - `depth` integer, required — Analysis target depth
      - `sessionId` string, required — Arbitary string that identifies the analysis session. Providers may wish to clear the hash table between sessions.
      - `threads` integer, required — Number of threads to use for analysis.
      - `hash` integer, required — Hash table size to use for analysis, in MiB.
      - `multiPv` integer, required — Requested number of principal variations.
      - `variant` 'chess' | 'crazyhouse' | 'antichess' | 'atomic' | 'horde' | 'kingofthehill' | 'racingkings' | '3check', required
      - `initialFen` string, required — Initial position of the game.
      - `moves` string[], required — List of moves played from the initial position, in UCI notation.
    - object
      - `nodes` integer, required — Number of nodes to analyse in the position
      - `sessionId` string, required — Arbitary string that identifies the analysis session. Providers may wish to clear the hash table between sessions.
      - `threads` integer, required — Number of threads to use for analysis.
      - `hash` integer, required — Hash table size to use for analysis, in MiB.
      - `multiPv` integer, required — Requested number of principal variations.
      - `variant` 'chess' | 'crazyhouse' | 'antichess' | 'atomic' | 'horde' | 'kingofthehill' | 'racingkings' | '3check', required
      - `initialFen` string, required — Initial position of the game.
      - `moves` string[], required — List of moves played from the initial position, in UCI notation.

## Response `200`

Stream of analysis output

---

[API](https://skmtc.net/lichess/apis/lichess-org-api-reference.md) · [All operations](https://skmtc.net/lichess/apis/lichess-org-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lichess/lichess-org-api-reference/versions/1425db81eb3b/schema)
