Skip to content
DocsUnitley Docs home
REST API reference

The REST API

Call Unitley's tools over plain HTTP: the base URL, how to send your access token, what a request must look like and the shape of every answer.

The REST API serves the same 20 tools as the MCP server, for scripts and agents that do not speak MCP. It has two endpoints: one lists the tools, and one calls a tool. Endpoints covers both in full.

Base URL

https://console.unitley.com/api/v1/tools
  • GET the base URL to list every tool, with its input schema and the rules every answer must follow.
  • POST to the base URL followed by / and a tool's name to call that tool, such as /calc_implied_probability.

The API answers only on the console's own hostname. A request that reaches any other host gets 403 forbidden.

Authentication

Send an access token from the Connect page with every request:

Every request
Authorization: Bearer YOUR_UNITLEY_TOKEN

Unitley tokens start with unt_. A missing token, or one not shaped like a Unitley token, gets 401 invalid_token. So does a token that is unknown, revoked or expired. Both come with a WWW-Authenticate challenge: see Errors.

A read-only token can call every tool except the ones that save to your account: log_bet, settle_bet and save_recommendation need a token with write access. See Tokens and security.

Requests

A tool's arguments go in the body of the POST, as one JSON object:

  • Send Content-Type: application/json. A body sent with any other Content-Type gets 415 unsupported_media_type. A body sent with no Content-Type is read as JSON.
  • A body over 256 KB gets 413 payload_too_large.
  • A body that is not valid JSON, or is valid JSON but not an object, such as an array, gets 400 invalid_input.
  • An empty body means no arguments, the same as {}.

Each tool's arguments are listed in Every tool, and the list endpoint returns them as JSON Schema.

Browsers

The API sends no CORS headers, so a page on another site cannot read its answers. A browser request whose Origin is not the console itself is refused with 403 forbidden. Call the API from a server, a script or an agent, and keep your token out of code that runs in a browser.

Responses

Every answer is JSON, and every answer carries Cache-Control: no-store.

  • A success is HTTP 200 with the tool's result under data. It is the same result the MCP server returns for that tool.
  • A failure has an error status and an error object with a code, a message and a list of issues. A rate_limited error also has retryAfterSeconds.

The quick start below shows a success. Here is a failure, a call to calc_implied_probability with odds of 50:

400 · americanOdds of 50
{
  "error": {
    "code": "invalid_input",
    "message": "americanOdds: American odds must be +100 or more, or -100 or less.",
    "issues": [
      {
        "path": "americanOdds",
        "message": "American odds must be +100 or more, or -100 or less."
      }
    ]
  }
}

issues lists each field the check against the tool's schema found wrong, with its path and a message. It is empty for errors that are not about the arguments, and for the few argument problems found after that check, such as a page cursor that is not valid: their message names the field instead. One exception: log_bet marks a gameId that is not on the schedule, or is in another sport, with an issue on gameId. Errors lists every code and its status.

The rules in the tool list

The tool list also returns instructions: the rules Unitley asks every agent to follow, such as using only Unitley's tools for odds and stats, showing the reasoning and risks, and sizing stakes with calc_kelly_stake. They are word for word what the MCP server sends. If you build your own agent on the API, give these rules to your model along with the tools. You can read them on The MCP server.

Quick start

  1. Create a token

    Create one on the Connect page. A read-only token is enough here. Right after you create it, the Connect page shows these same commands with your token filled in. Below, replace YOUR_UNITLEY_TOKEN with it.

  2. List the tools

    List the tools
    curl -H "Authorization: Bearer YOUR_UNITLEY_TOKEN" https://console.unitley.com/api/v1/tools

    The answer holds the rules and every tool. Here it is shortened to one tool:

    200 · shortened to one tool
    {
      "instructions": "Unitley is analysis, not a guarantee; use only Unitley tools…",
      "tools": [
        {
          "name": "calc_implied_probability",
          "title": "Implied probability",
          "description": "Converts American odds to decimal odds and the win probability the price implies, vig included.",
          "scope": "read",
          "hints": {
            "readOnlyHint": true,
            "destructiveHint": false,
            "idempotentHint": true,
            "openWorldHint": false
          },
          "inputSchema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "americanOdds": {
                "type": "integer",
                "minimum": -100000,
                "maximum": 1000000
              }
            },
            "required": [
              "americanOdds"
            ]
          }
        }
      ]
    }
  3. Call a tool

    Run calc_implied_probability
    curl -X POST https://console.unitley.com/api/v1/tools/calc_implied_probability \
      -H "Authorization: Bearer YOUR_UNITLEY_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{"americanOdds": -110}'
    200 · the answer
    {
      "data": {
        "americanOdds": -110,
        "decimalOdds": 1.9090909090909092,
        "impliedProbability": 0.5238095238095238
      }
    }

Same tools as MCP

The REST API and the MCP server serve the tools from one registry, behind the same checks. A tool takes the same arguments, returns the same result, and is counted against the same per-token and per-user budgets on either one. The differences:

  • Errors. The REST API answers a failed call with an HTTP status and the error object. The MCP server returns the same code, message and issues inside a tool result marked isError.
  • Notes and prompts. The REST API has no resources or prompts. Search the knowledge notes with search_knowledge.
  • Per-address budget. Each has its own: 300 a minute for the REST API and 300 a minute for the MCP server. See Rate limits.

settle_bet is offered over the REST API and MCP, but not in the web analyst, where you settle bets on the Bet Log page.

Next

21+ · Gambling problem? Call 1-800-GAMBLER or visit ncpgambling.org

Unitley is an analysis tool, not a sportsbook: it takes no bets and holds no money. Nothing in these docs is a guarantee or financial advice. Only bet where it is legal for you. Unitley is not affiliated with the NFL, its teams, or any sportsbook.

©︎ 2026 Unitley · Analysis, not a guarantee.