Statshawk Assets API

Static asset proxy for team logo PNGs with long-lived cache headers; suitable for direct embedding in client apps.

GitHub OpenAPI

Operations 1

GET /v1/assets/team-logo/{team_id} Get team logo image #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/statshawk-ai:statshawk-ai-assets-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

statshawk-ai-assets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stat Engine Assets API
  description: 'Normalized, source-agnostic sports data API. Major competition coverage includes NBA, MLB, NFL, NHL, KBO, NCAA (basketball and football), and soccer competitions such as EPL, La Liga, Bundesliga, Serie A, Ligue 1, UCL, MLS, and FIFA tournaments. The complete canonical sport identifiers understood by the API are: `basketball`, `football`, `baseball`, `hockey`, `soccer`, `golf`, `tennis`, `racing`, `mma`, `lacrosse`, `rugby`, `volleyball`, `australian_football`, `rugby_league`, `water_polo`, and `field_hockey`. These identifiers describe data shape; call `GET /v1/competitions` for the currently registered competition slugs and `GET /v1/competitions/{comp}/capabilities` for the phases, measures, and standings tables available for a particular competition. Core resources — persons, teams, competitions/editions, contests, and entrants — carry minted ids that serialize as `_` (`per_`, `team_`, `comp_`, `edt_`, `game_`, `cst_`, `ent_`); the prefix is part of the type. Stats are typed per-phase and reconstruct as-of any ingested instant from appearance facts. ## Endpoint groups


    | Group | Base path | Description |

    |-------|-----------|-------------|

    | Persons | `/v1/persons` | Profile, appearances, game log, memberships, season stats, per-person capability discovery, composed player overview |

    | Teams | `/v1/teams` | Profile, as-of roster, games, game log, season stats |

    | Competitions | `/v1/competitions` | Competitions, editions, edition participants/games/standings, capability discovery |

    | Contests | `/v1/contests` | Generalized contest detail for team matches, individual matches, and field/N-ary events; team-match boxscores and sport-scoped play-by-play where available |

    | Analysis | `/v1/analysis` | Player-prop card and team comparison (all plans; metered at analysis weights) |

    | Account | `/v1/account` | Authenticated plan usage (unmetered — checking quota never consumes units) |

    | Assets | `/v1/assets` | Team logo PNGs (proxied, 7-day cache) |


    ## Authentication


    All endpoints in this spec require an API key passed in the `X-API-Key` request header. ## Operational endpoints


    Liveness/readiness probes (`/healthz`, `/readyz`, `/metrics`) and ingest administration endpoints (`/v1/ingest/...`) are intentionally **not documented in this spec**. They are operator-only surfaces and live in a separate internal spec; see infra docs for access. ## Response envelope


    Successful JSON responses wrap their payload in the following envelope. The team-logo asset endpoint returns PNG bytes instead:


    ```json

    {

    "data": {... },

    "meta": {

    "request_id": "uuid",

    "source": "source identifier",

    "fetched_at": "2025-01-01T00:00:00Z",

    "cache": "HIT | MISS | STALE",

    "version": "v1"

    }

    }

    ```


    Error responses use `{ "error": { "code": "...", "message": "..." } }`. `meta.request_id` uniquely identifies the request — quote it when filing support tickets. `meta.cache` is reserved for response-layer caching (`HIT` / `STALE` / `MISS`); entity reads use the canonical store, with some resources cached after assembly. `HIT` or `STALE` describes the response cache, not current upstream freshness. ## Freshness


    Reads are served from the canonical store, which ingest refreshes out-of-band on a per-resource cadence:


    - **Live box scores** are re-ingested within minutes of in-game updates while a slate is live. - **Standings** are recomputed whenever a game in the edition finalizes. - **Schedules** are re-synced several times per day. - **Final box scores** describe completed contests, but individual credits and other statistics remain subject to later source corrections. Historical coverage can remain incomplete while out-of-band repair proceeds. `meta.fetched_at` reports response assembly time, or a cached store-fetch timestamp when the read path propagates one. Handler caches such as the stat board use response assembly time even on `HIT` or `STALE`. This field cannot reliably measure payload age and does not report the last upstream correction time.'
  license:
    name: ''
  version: 1.0.0
  contact:
    name: statshawk support
    email: support@statshawk.ai
    url: https://statshawk.ai/contact
  termsOfService: https://statshawk.ai/terms
  x-versioning:
    strategy: url-path
    current: v1
    compatibility: additive-only within a major version, except documented changelog exceptions (2026-09-11 quota hard-stop under /v1)
    policy: https://statshawk.ai/docs/getting-started/versioning
  x-deprecation-policy:
    headers:
    - Deprecation
    - Sunset
    minimumNoticeDays: 90
    majorVersionRetirementMonths: 12
    changelog: https://statshawk.ai/docs/changelog
    policy: https://statshawk.ai/docs/getting-started/versioning
  x-permissions:
    access: read-only
    apiKeyEnvironments:
    - sk_live_
    - sk_test_
    mcpOAuthScopes:
    - stats:read
    - analysis:read
    policy: https://statshawk.ai/docs/getting-started/permissions
servers:
- url: https://api.statshawk.ai
security:
- api_key: []
- bearerAuth: []
tags:
- name: Assets
  description: Static asset proxy for team logo PNGs with long-lived cache headers; suitable for direct embedding in client apps.
paths:
  /v1/assets/team-logo/{team_id}:
    get:
      tags:
      - Assets
      summary: Get team logo image
      description: 'Returns the team''s logo as a binary image response with a

        `Cache-Control: public, max-age=604800` header (7-day client cache).


        Logos are served from this API''s own asset store — no request-time

        fetch to any external host, by design.


        `team_id` is the public minted `team_...` id returned everywhere on the

        wire; a bare UUID (the legacy asset-store key) is also accepted for

        backward compatibility. Returns `404` if no logo is stored for the

        team.'
      operationId: get_v1_assets_team_logo_team_id
      parameters:
      - name: team_id
        in: path
        description: 'The public minted team id returned everywhere on the wire. Example: `team_06fhk442w5vw5czxwa06993p4m`. A bare UUID (the legacy asset-store key) is also accepted for backward compatibility.'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: 'Image bytes (PNG today) with `Cache-Control: public, max-age=604800`'
          content:
            image/png: {}
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
        '400':
          description: Database not available (required for logo lookup)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key (`UNAUTHORIZED`).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No logo stored for this team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Retry-After:
              $ref: '#/components/headers/Retry-After'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal failure (`INTERNAL_ERROR`, `CACHE_ERROR`).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '501':
          description: Capability not supported for this competition (`NOT_SUPPORTED`).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Upstream data provider failed (`PROVIDER_ERROR`).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Auth backend, DB, or providers unavailable (`AUTH_BACKEND_UNAVAILABLE`, `DB_UNAVAILABLE`).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-statshawk-weight: 1
      x-statshawk-weight-class: lookup
      x-requires-tier: any
components:
  schemas:
    ErrorDetail:
      type: object
      description: Machine-readable error code, human-readable explanation, and optional top-level context fields.
      required:
      - code
      - message
      properties:
        code:
          type: string
          description: 'Stable machine-readable code; use this for program logic rather than message text.

            Examples: NOT_FOUND (missing resource), BAD_REQUEST (invalid input), UNKNOWN_STAT (unknown statistic),

            STAGE_NOT_SUPPORTED (unsupported stage), NOT_SUPPORTED (unsupported capability), UNAUTHORIZED (missing authentication),

            INVALID_API_KEY (invalid credential), RATE_LIMIT_EXCEEDED (request rate limit),

            DB_UNAVAILABLE (database pool unavailable), INTERNAL_ERROR (server failure), CACHE_ERROR (cache failure), or PROVIDER_ERROR (upstream failure).

            Middleware can return additional billing or authorization codes.'
        message:
          type: string
          description: Human-readable explanation; wording can change. Do not parse this field for an error category.
      additionalProperties:
        description: 'Additional structured context flattened beside code and message, with no extra wrapper key.

          No additional fields appear when this map is empty. Keys depend on the error category.


          On competition-resolution misses and capability gaps the canonical

          machine-readable list is [`crate::leagues::AVAILABLE_COMPETITIONS`]

          (`error.available_competitions`): every registered slug on `NOT_FOUND`

          / invalid-competition `BAD_REQUEST`, or the slugs that implement the

          named capability on `NOT_SUPPORTED`. The engine registry is the only

          source of truth — clients (including MCP) pass this array through and

          must not maintain a parallel list. The human `message` may summarize.'
    ErrorResponse:
      type: object
      description: Error response body.
      required:
      - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
          description: Structured failure details. Error responses do not use the successful data/meta envelope.
  headers:
    X-RateLimit-Remaining:
      description: Requests remaining in the current rate-limit window.
      schema:
        type: integer
    X-RateLimit-Reset:
      description: Unix timestamp (seconds) when the current rate-limit window resets. On quota responses, the billing-period end.
      schema:
        type: integer
    X-RateLimit-Limit:
      description: Maximum requests allowed in the current rate-limit window.
      schema:
        type: integer
    Retry-After:
      description: 'Seconds to wait before retrying. Sent on every `429` (per-second limiter: effectively always `1`; monthly quota: seconds until the period resets).'
      schema:
        type: integer
    X-Request-Id:
      description: Request correlation id (also echoed in `meta.request_id` on success).
      schema:
        type: string
        format: uuid
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: X-API-Key
      description: Raw API key (`sk_live_…` or `sk_test_…`). Preferred for REST clients. Keys are read-only; the environment prefix is the only key role. See https://statshawk.ai/docs/getting-started/permissions
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: 'Same API key as a bearer token: `Authorization: Bearer sk_live_…` (scheme required).'