API reference

API reference

Every route of the API in four groups. Each route has one block: its parameters, a sample request in three languages, a sample answer and its errors.

In short

  • The address is https://api.gtogecko.com. Every route is under /v1.
  • Send Authorization: Bearer and your key. Three routes are open: health, hands and pricing.
  • JSON in and out. Every POST with a body needs Content-Type: application/json.
  • An error has one shape with a stable code: see Errors.

Routes

Solves

RouteUse
POST/v1/solvesSolve a spot, the next street of a solve, or many boards.
GET/v1/solves/{id}State, queue and progress of a solve.
GET/v1/solves/{id}/resultThe result of one street.
GET/v1/solves/{id}/nodesThe nodes of a result.
GET/v1/solves/{id}/nodes/{node_id}One decision: range, strategy and EV of each hand.
GET/v1/solves/{id}/exitsThe lines that end the street.
GET/v1/solves/{id}/childrenThe solves under a solve, or the boards of a batch.
POST/v1/solves/{id}/cancelStop a request.
GET/v1/solvesYour requests, newest first.

Planning

RouteUse
POST/v1/estimatesThe solves and calls a request needs. Free.
POST/v1/treesThe betting tree and exits of a spot. Free.
POST/v1/warmupStart a solver before the first solve. Free.

Account and billing

RouteUse
GET/v1/accountCalls left, limits and usage of the key.
GET/v1/ledgerEvery change of the balance.
POST/v1/billing/checkoutA payment page for a pack or a plan.

Service

RouteUse
GET/v1/healthState of the service, what the solver supports, warm or cold. No key.
GET/v1/handsThe order of the 1,326 hands. No key.
GET/v1/pricingThe price of a call, plans and packs. No key.

Look it up

The basics

address, key, format, lists, times, errors
Address
https://api.gtogecko.com. The version is in the path: /v1. A trailing slash on a route redirects (307) to the route without it.
Key
Authorization: Bearer and your key, on every route but the three open ones. See Keys and authentication.
Format
JSON in and out. Every POST with a body needs Content-Type: application/json.
Lists
{"data": [...], "next": ...}. For the next page send after with the next value. Stop when next is null. The nodes and exits of a solve are not in pages: they return the whole list as {"data": [...]}, without next.
Times
Seconds since 1970 (UTC), as numbers.
Errors
One shape, application/problem+json, with a stable code. See Errors.

Headers

Prefer, Idempotency-Key, Request-Id, RateLimit, Retry-After
Authorizationrequest, required
Bearer and your key.
Content-Typerequest, on POST
application/json.
Preferrequest, optional
wait=N holds the answer of POST /v1/solves and GET /v1/solves/{id} up to N seconds while the solve is not finished. The most is 30. See Waiting for a result.
Idempotency-Keyrequest, optional
8 to 128 characters, on POST /v1/solves. It makes a repeat safe: see safe to repeat.
Request-Idresponse
On every answer. In an error it is the same as request_id in the body. Send it to us when you ask about a request.
RateLimit-Limit, RateLimit-Remainingresponse
On every call that reached the check of the key: the requests a minute this key may send, and how many are left now. Not on the three open routes, and not on an answer that was refused before that check: see rate limits.
Retry-Afterresponse
Seconds to wait, on 429 rate_limited, 503 temporarily_unavailable and 409 request_in_progress. The same number is in the body as retry_after.

For your tools

the OpenAPI file, a call in the browser, llms.txt
  • Try a call in the browser: the interactive page of this API. Press Authorize there and paste your key.
  • /openapi.json: the OpenAPI file, with examples, for code generators and API clients. It describes errors as application/problem+json.
  • /llms.txt: a plain-text summary of this documentation for AI tools.
  • sample-result.json: a complete real result, to build a parser against.