# Chessigma API

> For AI agents: the documentation index is at https://www.chessigma.com/llms.txt.

`v1.0.0`

A free API for chess game analysis. Submit a game, read its analysis, calculate rating changes, and fetch the daily puzzle. No API key, no signup, no paywall.

- [OpenAPI spec](https://www.chessigma.com/openapi.json)
- [API catalog](https://www.chessigma.com/.well-known/api-catalog)
- [MCP server](https://www.chessigma.com/developers/mcp.md)

Base URL: `https://www.chessigma.com/public-api/v1`

## Using the API

### No authentication

No API key or account. Every endpoint is open.

### 30 requests / minute

A shared global limit. Over it returns 429.

### Compute-free

Engine analysis runs in the browser. Submit a game, then open its URL to analyze.

Please attribute Chessigma when you use the API. By using it you accept the [terms of service](https://www.chessigma.com/tos).

## Quickstart

Submit a game, then open the returned URL to view and analyze it.

```bash
curl -X POST https://www.chessigma.com/public-api/v1/game \
  -H "Content-Type: application/json" \
  -d '{"pgn": "[White \"Alice\"]\n[Black \"Bob\"]\n[Result \"1-0\"]\n\n1. e4 e5 2. Nf3 Nc6 1-0"}'

# 201 Created
# { "gameId": "f222a278-...", "url": "https://www.chessigma.com/games/f222a278-...", "status": "submitted" }
```

## Endpoints

### [POST /game](https://www.chessigma.com/developers/api/game-analysis.md)

Submit a game (PGN) for analysis

Stores a chess game and returns a URL to view and analyze it on Chessigma. Duplicate games (same players + date) are deduplicated and return the existing gameId.

### [GET /game/{gameId}](https://www.chessigma.com/developers/api/game-analysis.md)

Retrieve analysis for a submitted game

Returns game metadata and analysis. Because analysis runs client-side, this returns data only if a user has already opened the game page and triggered analysis. Only games submitted via this public API are readable here.

### [GET /elo-calculator](https://www.chessigma.com/developers/api/elo-calculator.md)

Compute an Elo rating change for a single game

Pure arithmetic. Returns the new rating, point change, and expected score.

### [GET /daily-puzzle](https://www.chessigma.com/developers/api/daily-puzzle.md)

Get the daily chess puzzle

Returns the single daily puzzle for today, or a past date via ?date=YYYY-MM-DD. Returns exactly one puzzle. The full puzzle database is not exposed.

Full request and response schemas are in the [OpenAPI spec](https://www.chessigma.com/openapi.json).

## Linkable routes

You do not always need the API. These URLs drop a user straight into a live, client-side tool. Standardize on `fen` for positions and `pgn` for games. URL-encode the value.

- **Analyze a position** `/tools/analysis?fen=<FEN>`
  Opens the live analysis board on a position.
- **Analyze a full game** `/tools/analysis?pgn=<PGN>`
  Loads a game for move-by-move replay and analysis.
- **Best next move** `/tools/next-move?fen=<FEN>`
  Finds the engine's best move for a position.
- **Set up a position** `/tools/analysis/editor?fen=<FEN>`
  Opens the board editor on a position.
- **View a submitted game** `/games/<gameId>?move=<n>`
  Jumps to a specific move in a submitted game.

## For AI agents

Chessigma publishes a machine-readable discovery surface so AI agents can find and use it.

- [/developers/mcp](https://www.chessigma.com/developers/mcp.md): the MCP server, which brings Chessigma's chess tools to Claude, ChatGPT and other AI assistants.
- [/openapi.json](https://www.chessigma.com/openapi.json): the OpenAPI 3.1 contract.
- [/.well-known/api-catalog](https://www.chessigma.com/.well-known/api-catalog): RFC 9727 catalog.
- [/.well-known/agent-skills/index.json](https://www.chessigma.com/.well-known/agent-skills/index.json): the agent skill index.
