⚡ Instant Chess Evaluation & Vision API

Cheetah Chess API

Empower AI agents and applications with high-speed deterministic Stockfish position evaluations, FEN game-state explanations, and computer vision board recognition over REST & MCP.

Why Use Cheetah?

🎯

Deterministic vs LLM Hallucination

LLMs are non-deterministic pattern matchers prone to hallucinating illegal chess moves or fake checkmates. Chess is strictly deterministic—let Cheetah evaluate positions deterministically while your LLM focuses on strategy.

Zero Setup & Zero Installation

Your AI agent doesn't need to compile engine binaries, manage local engine runtimes, or set up complex native operating system dependencies. Simply make simple HTTP requests.

💬

No UCI Protocol Complexity

Avoid writing complex low-level UCI string parsers and process communication loops. Cheetah converts raw engine evaluation output into clean, structured JSON.

👁️

Computer Vision Image-to-FEN

Upload an image file or supply an image URL of a chessboard screenshot. Cheetah automatically crops and detects piece layouts to extract board FEN representations.

🤖

Model Context Protocol (MCP) Support

Native MCP server integration over Streamable HTTP allowing Claude Desktop, Cursor, or AI agent frameworks to consume engine tools directly out of the box.

🚀

Sub-Millisecond Response Speed

Built-in intelligent caching delivers instant sub-millisecond responses on evaluated positions, eliminating redundant calculations.

API Quick Reference

GET /api/stockfish

Evaluates a FEN position using Stockfish. Returns best move (algebraic & SAN), evaluation score (centipawns or mate), and principal variations.

curl "http://localhost:3000/api/stockfish?fen=rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR+b+KQkq+-+0+1&depth=10" \ -H "Authorization: Bearer YOUR_API_KEY"
GET /api/explain

Parses a FEN string using the Fen utility and returns structured game state details (whose turn, castling rights, in_check, game_over, checkmate/stalemate status, winner).

curl "http://localhost:3000/api/explain?fen=r1bqkbnr/pppp1Qpp/2n5/4p3/2B1P3/8/PPPP1PPP/RNB1K1NR+b+KQkq+-+0+4" \ -H "Authorization: Bearer YOUR_API_KEY"
POST /api/img-to-fen

Recognizes chessboard layout from an uploaded image file or URL. Accepts an optional flip=1 parameter to rotate the output 180°.

# Image URL option curl -X POST http://localhost:3000/api/img-to-fen \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com/chessboard.png", "flip": 1}'
POST /mcp

Model Context Protocol (MCP) Streamable HTTP endpoint for AI tool calling. Provides evaluate_position and explain_position tools.

curl -X POST http://localhost:3000/mcp \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"evaluate_position","arguments":{"fen":"rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1","depth":10}}}'