Chess position API preview. Photo in, FEN out.

Send a photo of a real chessboard and get the position back as FEN, with confidence, the squares the model doubts, the board’s orientation and a rendered board. The API is a preview: free, limited to 5 scans a day per account, and it may change without notice.

Photo of a wooden chess board mid-game, taken from above
Example response200
{
  "status": "completed",
  "fen": "r2q1rk1/2p2ppp/2np1N2/1pb1p1B1/p3P3/1B1P1Q1P/PPP2PP1/R4RK1 w - - 0 1",
  "unsure_squares": ["e4", "f6"],
  "orientation": { "view": "white" }
}

Get a key

Sign in to the web app, open Settings, and create a key under API access. An account has one key, and it is shown only once.

For agents

An agent can ask a person for a key. It sends POST /api/agent/auth/register with its name and the person’s email, and shows the person the code it gets back. The person approves the request in Settings, and the agent polls until it can collect the key, which it gets once. auth.md has the details.

Connect an MCP client

Claude and other MCP clients can read boards for a person through our MCP server, with no key to copy. The person signs in and approves the app, and can disconnect it in Settings.

In Claude Code
claude mcp add --transport http snap-that-piece https://app.snapthatpiece.com/mcp

Its tools read a board from a public link, make a one-time link for sending a photo the person attached or a file on their computer, get and list scans, take a report of a wrong read, and say what’s left today. Limits count per person, so a connected app and a key share the same 5 scans a day.

Scan a board

Post the photo as the request body, up to 10 MB, as JPEG, PNG, WebP or HEIC:

POST /api/v1/scans
curl -X POST https://app.snapthatpiece.com/api/v1/scans \
  -H "Authorization: Bearer $STP_KEY" \
  -H "Content-Type: image/jpeg" \
  --data-binary @board.jpg

Send the original file: a small photo gets misread. It can be up to 50 megapixels, or 12 for WebP, and at least 64 pixels on each side. Metadata such as location is removed before the photo is stored, apart from the camera fields recognition reads. A HEIC only gets a check that the file holds together: it keeps its metadata, and these sizes aren’t checked.

The answer is 202 with the scan’s id. Scans run in the background and usually finish in seconds, so poll about once a second until status is completed or failed:

GET /api/v1/scans/{id}
curl https://app.snapthatpiece.com/api/v1/scans/$SCAN_ID \
  -H "Authorization: Bearer $STP_KEY"

What comes back

Example response
{
  "id": "0f1e2d3c-4b5a-6978-8796-a5b4c3d2e1f0",
  "status": "completed",
  "created_at": "2026-10-30T15:12:04+00:00",
  "completed_at": "2026-10-30T15:12:06+00:00",
  "fen": "r2q1rk1/2p2ppp/2np1N2/1pb1p1B1/p3P3/1B1P1Q1P/PPP2PP1/R4RK1 w - - 0 1",
  "confidence": { "board": 0.86, "mean": 0.61 },
  "unsure_squares": ["e4", "f6"],
  "unsure": true,
  "orientation": { "view": "white", "ambiguous": false },
  "is_flipped": false,
  "piece_count": 29,
  "board_px_per_square": 82.5,
  "low_angle": false,
  "rating": null,
  "error": null,
  "message": null,
  "links": {
    "self": "/api/v1/scans/0f1e2d3c-4b5a-6978-8796-a5b4c3d2e1f0",
    "board_svg": "/api/v1/scans/0f1e2d3c-4b5a-6978-8796-a5b4c3d2e1f0/board.svg",
    "board_png": "/api/v1/scans/0f1e2d3c-4b5a-6978-8796-a5b4c3d2e1f0/board.png",
    "rating": "/api/v1/scans/0f1e2d3c-4b5a-6978-8796-a5b4c3d2e1f0/rating",
    "correct": "/api/v1/scans/0f1e2d3c-4b5a-6978-8796-a5b4c3d2e1f0/correct"
  }
}
  • fen: the position, in full FEN. A photo doesn’t show whose turn it is, so treat the side to move, castling and en passant as placeholders.
  • confidence: the classifier’s probabilities from 0 to 1, over the occupied squares and over all 64. They are not an accuracy figure.
  • unsure_squares: squares read below the model’s usual confidence. Check these first, but errors can be elsewhere too.
  • unsure: true with two or more unsure squares. Have someone check the read.
  • orientation: the side to show the board from, which is the side the photo was taken from unless the position was turned or its owner changed the view, and whether the model couldn’t tell which side is which.
  • is_flipped: whether the position is turned 180° from what the model read.
  • rating: what the account said about this read, if anything.
  • If a scan is corrected, in the app or through the API, fen, unsure_squares and the rendered board follow the correction.
  • board_px_per_square: the board’s size in the photo. Under about 40, expect more errors.
  • low_angle: true when a real board was photographed from too low an angle, more than about 50° from straight overhead, where reads are much less reliable. Suggest a retake from higher up. Never true for screens.
  • error and message: why a scan failed, as a code and a sentence. Both are null otherwise.

Report a wrong read

Report it when the person says the position is wrong, or when you can see that it is. Both routes work on completed scans sent with your key and answer with the updated scan. They allow 60 reports an hour per account, and don’t use up scans.

Say whether the read was right. A thumbs-down asks one of us to look at the photo. rating is up, down, or null to take it back, and sending the rating a scan already has changes nothing:

POST /api/v1/scans/{id}/rating
curl -X POST https://app.snapthatpiece.com/api/v1/scans/$SCAN_ID/rating \
  -H "Authorization: Bearer $STP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rating": "down"}'

Send the right position, if the person confirmed it or you can verify it:

POST /api/v1/scans/{id}/correct
curl -X POST https://app.snapthatpiece.com/api/v1/scans/$SCAN_ID/correct \
  -H "Authorization: Bearer $STP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fen": "r2q1rk1/2p2ppp/2np1N2/1pb1p1B1/p3P3/1B1P1Q1P/PPP2PP1/R4RK1"}'

Send fen in the same orientation as the scan’s fen. Only its piece placement is used. If the pieces are right but the board is turned around, send {"is_flipped": true} instead. It’s a value, not a toggle: the scan’s is_flipped says what it is now. You can send both fields together, and fen still reads back as you sent it. A board image fetched in the last five minutes may still be cached.

Your scans

GET /api/v1/scans lists the scans sent with your key, newest first, 20 at a time. Add ?limit= for up to 100. A full page carries next_before, the time to pass as ?before= for the next page, which can be empty. A shorter page has null.

Scans appear in your account in the app. Deleting one from your history doesn’t remove the photo, and deleting your account ends the key but keeps photos as our Privacy Policy describes.

Rendered board

GET /api/v1/scans/{id}/board.svg draws the read board from the scan’s orientation.view, with an amber dot on each unsure square. Add ?view=white or ?view=black to choose the side.

GET /api/v1/scans/{id}/board.png draws the same board as an image, for chat apps and anything else that can’t show SVG. Add ?size=256, 512 or 1024 for its width in pixels. The default is 512.

During the preview, the strip under the board carries the Snap That Piece logo and name, which makes the picture slightly taller than it is wide. Please leave it in place.

The example position drawn by the API, with amber dots on e4 and f6 and the Snap That Piece logo in a strip under the board

Stockfish evaluations are not part of the preview.

Limits

  • 5 boards read a day per account, over a rolling 24 hours. A photo where no board is found doesn’t count, but only 15 tries are allowed in the same period, whatever their result.
  • GET /api/v1/usage says how many scans are left and when one comes back.
  • Over a limit, the answer is 429 with a Retry-After header, and an error code to branch on.

Errors

An error has a stable error code to branch on and a message to show a person.

StatuserrorMeaning
400bad_viewbad_sizebad_limitbad_beforeA query parameter isn’t one the route accepts.
400bad_ratingbad_fenA report’s rating or position isn’t valid.
400bad_requestbad_agent_namebad_emailA JSON body can’t be read or lacks what the route needs, or an agent’s request for a key isn’t valid.
401invalid_keyThe key is missing, wrong, replaced or revoked.
404not_foundNo such scan with this key, or no such agent request.
409not_readyThe scan has no board to draw or report on: it hasn’t finished, or it failed.
413too_largeimage_too_largeThe photo is over 10 MB, has too many pixels, or takes too much to read.
415not_an_imageimage_too_smallThe body isn’t a readable JPEG, PNG, WebP or HEIC image, or it’s under 64 pixels on a side.
429daily_limit5 boards read in 24 hours.
429too_many_attempts15 tries in 24 hours.
429rate_limitedToo many requests in a short time, or over 60 reports in an hour.
499client_disconnectedThe upload was cut off.
502upload_failedThe photo couldn’t be stored. Try again.
503unavailableThe preview is at capacity today or busy reading other photos. See Retry-After.

A scan that fails still answers 200, with status set to failed:

errorMeaning
no_boardNo chessboard was found in the photo.
not_readableThe photo could not be read as an image.
timeoutReading the photo took too long. Try again.
engine_unavailableThe recognition engine was unavailable. Try again.
processing_errorSomething went wrong reading the photo. Try again.

How results may be used

A result may be used to answer the person who asked for it. It may not be used to train or fine-tune models, to build a dataset, or be sold or redistributed. Photos sent through the API may be used to train our models, so only send photos you have the right to share. The full wording is in the Terms of Service.

Read your first board

Create a key in Settings and send a photo. 5 scans a day, free during the preview.