> ## Documentation Index
> Fetch the complete documentation index at: https://judged.systems/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get stats

> Requires judgments:read.



## OpenAPI

````yaml /openapi.json get /api/stats
openapi: 3.1.0
info:
  title: judged.systems
  version: 0.1.0
  description: >-
    Judge one support ticket. Product routes accept an API key or a browser
    session. If a key is sent, the session is not used. POST /api/judge and POST
    /api/webhooks/inbound accept an API key only. Send the key in the x-api-key
    header or as Authorization: Bearer.
servers:
  - url: https://judged.systems
security:
  - apiKey: []
  - bearerAuth: []
  - {}
tags:
  - name: Packs
  - name: Judge
  - name: Evaluations
  - name: Reviews
  - name: Labels
  - name: Datasets
  - name: Simulations
  - name: Stats
  - name: Webhooks
paths:
  /api/stats:
    get:
      tags:
        - Stats
      summary: Get stats
      description: Requires judgments:read.
      operationId: getStats
      responses:
        '200':
          description: Counts for the overview screen.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stats'
        default:
          $ref: '#/components/responses/Error'
components:
  schemas:
    Stats:
      type: object
      required:
        - evaluationsToday
        - byStatus
        - avgLatencyMs
        - tokens
        - recentRuns
        - recentWebhookFailures
        - reviewsToLabel
        - webhookFailureCount
        - daily
      properties:
        evaluationsToday:
          type: integer
        byStatus:
          type: object
          required:
            - accept
            - review
            - reject
          properties:
            accept:
              type: integer
            review:
              type: integer
            reject:
              type: integer
        avgLatencyMs:
          type: number
        tokens:
          type: object
          required:
            - input
            - output
          properties:
            input:
              type: number
            output:
              type: number
        recentRuns:
          type: array
          items:
            type: object
            required:
              - id
              - status
              - packId
              - createdAt
            properties:
              id:
                type: string
              status:
                $ref: '#/components/schemas/ResultStatus'
              packId:
                type: string
              createdAt:
                type: string
                format: date-time
        recentWebhookFailures:
          type: array
          items:
            type: object
            required:
              - id
              - evaluationId
              - lastStatusCode
              - updatedAt
            properties:
              id:
                type: string
              evaluationId:
                type: string
              lastStatusCode:
                type:
                  - integer
                  - 'null'
              updatedAt:
                type: string
                format: date-time
        reviewsToLabel:
          type: integer
        webhookFailureCount:
          type: integer
        daily:
          type: array
          items:
            type: object
            required:
              - date
              - accept
              - review
            properties:
              date:
                type: string
              accept:
                type: integer
              review:
                type: integer
    ResultStatus:
      type: string
      enum:
        - accept
        - review
        - reject
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        issues:
          type: array
          items:
            type: object
  responses:
    Error:
      description: >-
        Error body is { error: string }. Status is 400, 401, 403, 404, 409, 429,
        or 500. A 400 from a schema failure also includes issues.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
    bearerAuth:
      type: http
      scheme: bearer
      description: 'The API key, sent as Authorization: Bearer.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.