UnoRouter Stats API

The Stats API from UnoRouter, for stats.

GitHub OpenAPI

Operations 5

GET /api/data/summary Get Quota Data Summary #
GET /api/log/by-request Get Log By Request #
GET /api/model_status/buckets Get Model Status Buckets #
GET /api/model_status/components Get Model Status Components #
GET /api/model_status/page_compact Get Model Status Page Compact #

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/unorouter-com:unorouter-com-stats-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

unorouter-com-stats-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: ' '
  title: New Stats API
  version: 0.0.1
tags:
- name: Stats
paths:
  /api/data/summary:
    get:
      operationId: getQuotaDataSummary
      parameters:
      - in: query
        name: start_timestamp
        schema:
          type: integer
      - in: query
        name: end_timestamp
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response_model.QuotaDataSummary'
            application/xml:
              schema:
                $ref: '#/components/schemas/Response_model.QuotaDataSummary'
          description: OK
      security:
      - {}
      summary: Get Quota Data Summary
      tags:
      - Stats
  /api/log/by-request:
    get:
      operationId: getLogByRequest
      parameters:
      - description: Full request ID naming exactly one log row
        in: query
        name: request_id
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response_dto.LogByRequestData'
            application/xml:
              schema:
                $ref: '#/components/schemas/Response_dto.LogByRequestData'
          description: OK
      security:
      - {}
      summary: Get Log By Request
      tags:
      - Stats
  /api/model_status/buckets:
    get:
      operationId: getModelStatusBuckets
      parameters:
      - description: Model name (required)
        in: query
        name: model
        schema:
          type: string
      - description: 'Bucket size: 1m|5m|15m|1h|1d (default 15m)'
        in: query
        name: bucket
        schema:
          type: string
      - description: History window in hours (default 24, max 720)
        in: query
        name: hours
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response_Array-controller.StatusBarDataDTO'
            application/xml:
              schema:
                $ref: '#/components/schemas/Response_Array-controller.StatusBarDataDTO'
          description: OK
      security:
      - {}
      summary: Get Model Status Buckets
      tags:
      - Stats
  /api/model_status/components:
    get:
      operationId: getModelStatusComponents
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response_Array-controller.ComponentDTO'
            application/xml:
              schema:
                $ref: '#/components/schemas/Response_Array-controller.ComponentDTO'
          description: OK
      security:
      - {}
      summary: Get Model Status Components
      tags:
      - Stats
  /api/model_status/page_compact:
    get:
      operationId: getModelStatusPageCompact
      parameters:
      - description: 'Bucket size: 1m|5m|15m|1h|1d (default 15m)'
        in: query
        name: bucket
        schema:
          type: string
      - description: History window in hours (default 24, max 720)
        in: query
        name: hours
        schema:
          type: integer
      - description: 1 = emit compact per-bucket tuples; default 0 (verbose StatusBarData[])
        in: query
        name: compact
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response_controller.CompactPageDTO'
            application/xml:
              schema:
                $ref: '#/components/schemas/Response_controller.CompactPageDTO'
          description: OK
      security:
      - {}
      summary: Get Model Status Page Compact
      tags:
      - Stats
components:
  schemas:
    EventDTO:
      properties:
        from:
          type: string
        id:
          type: integer
        is_aggregated:
          type: boolean
        name:
          type: string
        to:
          nullable: true
          type: string
        type:
          type: string
      required:
      - from
      - id
      - name
      - to
      - type
      type: object
    ComponentDTO:
      properties:
        description:
          type: string
        group_id:
          nullable: true
          type: integer
        id:
          type: integer
        name:
          type: string
        open_incident_id:
          nullable: true
          type: integer
        probe_latency_ms:
          type: integer
        sampled_at:
          format: int64
          type: integer
        status:
          type: string
        total_channels:
          type: integer
        up_channels:
          type: integer
        uptime_24h:
          format: double
          type: number
        uptime_30d:
          format: double
          type: number
      required:
      - description
      - id
      - name
      - probe_latency_ms
      - sampled_at
      - status
      - total_channels
      - up_channels
      - uptime_24h
      - uptime_30d
      type: object
    QuotaDataSummary:
      properties:
        avg_tpm:
          format: int64
          type: integer
        count:
          format: int64
          type: integer
        earliest_created_at:
          format: int64
          type: integer
        quota:
          format: int64
          type: integer
        token_used:
          format: int64
          type: integer
      required:
      - avg_tpm
      - count
      - earliest_created_at
      - quota
      - token_used
      type: object
    Response_Array-controller.ComponentDTO:
      description: Response_Array-controller.ComponentDTO schema
      properties:
        data:
          items:
            $ref: '#/components/schemas/ComponentDTO'
          type:
          - array
          - 'null'
        message:
          type: string
        success:
          type: boolean
      required:
      - data
      - message
      - success
      type: object
    LogByRequestData:
      properties:
        channel:
          type: string
        completion_tokens:
          type: integer
        group:
          type: string
        model_name:
          type: string
        prompt_tokens:
          type: integer
        quota:
          type: integer
        use_time:
          type: integer
      required:
      - channel
      - completion_tokens
      - group
      - model_name
      - prompt_tokens
      - quota
      - use_time
      type: object
    Response_model.QuotaDataSummary:
      description: Response_model.QuotaDataSummary schema
      properties:
        data:
          $ref: '#/components/schemas/QuotaDataSummary'
        message:
          type: string
        success:
          type: boolean
      required:
      - data
      - message
      - success
      type: object
    Response_dto.LogByRequestData:
      description: Response_dto.LogByRequestData schema
      properties:
        data:
          $ref: '#/components/schemas/LogByRequestData'
        message:
          type: string
        success:
          type: boolean
      required:
      - data
      - message
      - success
      type: object
    BarSegmentDTO:
      properties:
        height:
          type: integer
        status:
          type: string
      required:
      - height
      - status
      type: object
    CompactBarDTO:
      properties:
        buckets:
          items: {}
          type:
          - array
          - 'null'
        events:
          additionalProperties:
            items:
              type: integer
            type: array
          type:
          - object
          - 'null'
      required:
      - buckets
      type: object
    CardItemDTO:
      properties:
        status:
          type: string
        value:
          type: string
      required:
      - status
      - value
      type: object
    StatusBarDataDTO:
      properties:
        bar:
          items:
            $ref: '#/components/schemas/BarSegmentDTO'
          type: array
        card:
          items:
            $ref: '#/components/schemas/CardItemDTO'
          type: array
        day:
          type: string
        events:
          items:
            $ref: '#/components/schemas/EventDTO'
          type: array
      required:
      - bar
      - card
      - day
      - events
      type: object
    Response_Array-controller.StatusBarDataDTO:
      description: Response_Array-controller.StatusBarDataDTO schema
      properties:
        data:
          items:
            $ref: '#/components/schemas/StatusBarDataDTO'
          type:
          - array
          - 'null'
        message:
          type: string
        success:
          type: boolean
      required:
      - data
      - message
      - success
      type: object
    Response_controller.CompactPageDTO:
      description: Response_controller.CompactPageDTO schema
      properties:
        data:
          $ref: '#/components/schemas/CompactPageDTO'
        message:
          type: string
        success:
          type: boolean
      required:
      - data
      - message
      - success
      type: object
    CompactPageDTO:
      properties:
        bars:
          additionalProperties:
            $ref: '#/components/schemas/CompactBarDTO'
          type:
          - object
          - 'null'
        bucket_count:
          type: integer
        bucket_sec:
          format: int64
          type: integer
        bucket_start:
          format: int64
          type: integer
        components:
          items:
            $ref: '#/components/schemas/ComponentDTO'
          type:
          - array
          - 'null'
        incidents:
          items:
            $ref: '#/components/schemas/EventDTO'
          type:
          - array
          - 'null'
      required:
      - bars
      - bucket_count
      - bucket_sec
      - bucket_start
      - components
      - incidents
      type: object
  securitySchemes:
    accessToken:
      description: System access token for dashboard API routes. Must be paired with New-Api-User header.
      in: header
      name: Authorization
      type: apiKey
    anthropicApiKey:
      description: Anthropic-style API key. Used by /v1/messages and /v1/models.
      in: header
      name: x-api-key
      type: apiKey
    bearerAuth:
      description: API token (sk-...). Used by relay routes (/v1/*) and token-based query endpoints.
      scheme: bearer
      type: http
    newApiUser:
      description: User ID header. Required together with the access token or session cookie for dashboard API routes.
      in: header
      name: New-Api-User
      type: apiKey
    sessionAuth:
      description: Session cookie from /api/user/login. Used by dashboard routes as an alternative to access token.
      in: cookie
      name: session
      type: apiKey