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

Built for agents, not just for people

Everything from discovery to payment is an HTTP call. The only step that needs a human is the one that needs a credit card, and the API hands you the link for it.

The loop

StepCallWhat comes back
DiscoverGET /llms.txt, GET /openapi.jsonAuth, endpoints, cost annotations in under 800 tokens
TryPOST /v1/eval with no keyA real evaluation (depth ≤ 10) plus the signup call to make next
Sign upPOST /v1/signup {"email", "agent"}A live key on the free plan, immediately
BudgetGET /v1/price, X-Quota-RemainingUnits for any request before you send it; what is left after
Hit a limitany call → 402next_action, plan options, and a checkout URL for your human
Keep goingsame keyLimits update within 60 s of payment; nothing to reconfigure

Errors tell you what to do

Every error is RFC 9457 problem+json with a next_action you can branch on:

next_actionStatusDo this
fix_request400Read detail; the request will never succeed as sent
retry_after429, 503Wait Retry-After seconds, then retry with the same Idempotency-Key
sign_up401, 402, 429 (keyless)Call the signup object in the body
upgrade402Show checkout.url to your operator, or pick a smaller depth
raise_budget402PATCH /v1/keys/{id} if you hold the keys scope, otherwise ask
verify_email403The account needs its claim email clicked
contact403, 501Surface the message; a person has to act
HTTP/1.1 402 Payment Required
Content-Type: application/problem+json

{
  "type": "https://stockfishapi.com/errors/quota_exceeded",
  "title": "Daily quota exceeded",
  "status": 402,
  "next_action": "upgrade",
  "retry_after": 31250,
  "plans": [{ "plan": "hobby", "price_usd_month": 9, "included_units": 100000, "max_depth": 22 }],
  "checkout": { "method": "POST", "url": "https://stockfishapi.com/v1/billing/checkout", "body": { "plan": "hobby" } }
}

Scoped keys for sub-tasks

The signup key carries the keys scope, so an agent can mint narrower keys for the work it delegates: POST /v1/keys {"scopes": ["eval"], "budget_units": 500}. A sub-agent that leaks its key can spend at most 500 units and cannot touch billing.

MCP

The MCP endpoint at https://stockfishapi.com/mcp supports Streamable HTTP with evaluate_position, best_move, legal_moves, and validate_position. Configure your API key as a Bearer token, or use the keyless trial. OAuth is not supported.

Retry and backoff

  • Honour Retry-After; it is exact, not a guess.
  • Send an Idempotency-Key on POSTs you may retry.
  • Do not raise depth to "get a better answer" without checking GET /v1/price; cost grows 1.6× per ply.
  • Prefer bestmove when you only need a move; it is half the price of eval.