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: Bearerand your key. Three routes are open: health, hands and pricing. - JSON in and out. Every
POSTwith a body needsContent-Type: application/json. - An error has one shape with a stable
code: see Errors.
Routes
Solves
| Route | Use |
|---|---|
POST/v1/solves | Solve 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}/result | The result of one street. |
GET/v1/solves/{id}/nodes | The nodes of a result. |
GET/v1/solves/{id}/nodes/{node_id} | One decision: range, strategy and EV of each hand. |
GET/v1/solves/{id}/exits | The lines that end the street. |
GET/v1/solves/{id}/children | The solves under a solve, or the boards of a batch. |
POST/v1/solves/{id}/cancel | Stop a request. |
GET/v1/solves | Your requests, newest first. |
Planning
| Route | Use |
|---|---|
POST/v1/estimates | The solves and calls a request needs. Free. |
POST/v1/trees | The betting tree and exits of a spot. Free. |
POST/v1/warmup | Start a solver before the first solve. Free. |
Account and billing
| Route | Use |
|---|---|
GET/v1/account | Calls left, limits and usage of the key. |
GET/v1/ledger | Every change of the balance. |
POST/v1/billing/checkout | A payment page for a pack or a plan. |
Service
| Route | Use |
|---|---|
GET/v1/health | State of the service, what the solver supports, warm or cold. No key. |
GET/v1/hands | The order of the 1,326 hands. No key. |
GET/v1/pricing | The 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: Bearerand your key, on every route but the three open ones. See Keys and authentication.- Format
- JSON in and out. Every
POSTwith a body needsContent-Type: application/json. - Lists
{"data": [...], "next": ...}. For the next page sendafterwith thenextvalue. Stop whennextisnull. Thenodesandexitsof a solve are not in pages: they return the whole list as{"data": [...]}, withoutnext.- Times
- Seconds since 1970 (UTC), as numbers.
- Errors
- One shape,
application/problem+json, with a stablecode. See Errors.
Headers
Prefer, Idempotency-Key, Request-Id, RateLimit, Retry-After
Authorizationrequest, requiredBearerand your key.Content-Typerequest, on POSTapplication/json.Preferrequest, optionalwait=Nholds the answer ofPOST /v1/solvesandGET /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_idin 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_unavailableand409 request_in_progress. The same number is in the body asretry_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 asapplication/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.