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

# Request statistics

> The figures behind the Studio home page, for one window: totals (requests, errors, distinct threads, users and messages, cost, tokens, average latency), a zero-filled time series, and breakdowns by billing group, agent, workflow, model, tool and scorer. Scorer runs are counted in the window they ran in, on their own group, the way the monthly statement bills them, and kept apart from the other requests (`scoring_runs`, `scoring_cost`, `by_scorer`). Filters are ANDed. One database call however large the window.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/requests/stats
openapi: 3.1.0
info:
  title: Sidenet API
  version: 1.0.0
  description: >-
    Sidenet HTTP endpoints exposed by the Sidenet Studio. All routes require an
    api key that can be generated through the studio in studio.sidenet.ai.
servers:
  - url: https://api.sidenet.ai
security:
  - bearerAuth: []
paths:
  /v1/requests/stats:
    get:
      tags:
        - Observability
      summary: Request statistics
      description: >-
        The figures behind the Studio home page, for one window: totals
        (requests, errors, distinct threads, users and messages, cost, tokens,
        average latency), a zero-filled time series, and breakdowns by billing
        group, agent, workflow, model, tool and scorer. Scorer runs are counted
        in the window they ran in, on their own group, the way the monthly
        statement bills them, and kept apart from the other requests
        (`scoring_runs`, `scoring_cost`, `by_scorer`). Filters are ANDed. One
        database call however large the window.
      parameters:
        - name: from
          in: query
          required: false
          schema:
            type: string
            format: date-time
            example: '2026-10-01T00:00:00Z'
          description: 'Start of the window (inclusive). Default: 30 days before `to`.'
        - name: to
          in: query
          required: false
          schema:
            type: string
            format: date-time
            example: '2026-11-01T00:00:00Z'
          description: 'End of the window (exclusive). Default: now.'
        - name: environment
          in: query
          required: false
          schema:
            type: string
            example: prod,staging
          description: Comma-separated environments.
        - name: group_id
          in: query
          required: false
          schema:
            type: string
            example: grp_84f20c19
          description: Comma-separated billing group ids (your stable ids).
        - name: copilot_id
          in: query
          required: false
          schema:
            type: string
            example: cccccccc-0000-4000-8000-000000000001
          description: Comma-separated copilot ids.
        - name: agent_id
          in: query
          required: false
          schema:
            type: string
            example: 6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10
          description: Comma-separated agent ids; every version of the agent counts.
        - name: resolution
          in: query
          required: false
          schema:
            type: string
            enum:
              - auto
              - hour
              - day
              - month
            default: auto
          description: >-
            Time series bucket. `auto` picks hour up to 2 days, day up to 93
            days, month beyond.
      responses:
        '200':
          description: The statistics
          content:
            application/json:
              schema:
                type: object
                properties:
                  resolution:
                    type: string
                    enum:
                      - hour
                      - day
                      - month
                  totals:
                    type: object
                    additionalProperties: true
                  series:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                  by_group:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                  by_agent:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                  by_workflow:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                  by_model:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                  by_tool:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                  by_scorer:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
              example:
                resolution: day
                totals:
                  requests: 1284
                  errors: 12
                  threads: 611
                  users: 402
                  messages: 1190
                  cost: 14.72
                  avg_latency_ms: 3870
                  input_tokens: 1820400
                  output_tokens: 240310
                  scoring_runs: 320
                  scoring_cost: 0.64
                series:
                  - bucket: '2026-10-27T00:00:00+00:00'
                    requests: 61
                    errors: 1
                    users: 24
                    cost: 0.71
                    scoring_cost: 0.02
                    avg_latency_ms: 3550
                by_group:
                  - group_id: 7
                    external_id: grp_84f20c19
                    name: Acme
                    requests: 900
                    errors: 8
                    users: 300
                    cost: 10.4
                    avg_latency_ms: 3900
                by_agent:
                  - agent_id: 6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10
                    name: Support
                    requests: 850
                    errors: 8
                    cost: 9.9
                    avg_latency_ms: 4100
                by_workflow:
                  - workflow_id: 4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641
                    name: Nightly digest
                    requests: 30
                    errors: 0
                    cost: 1.5
                    avg_latency_ms: 30000
                by_model:
                  - model: openai/gpt-4o
                    calls: 870
                    cost: 12.1
                    input_tokens: 1700000
                    output_tokens: 221000
                by_tool:
                  - tool: Acme_CRM_get_customer
                    runs: 410
                    errors: 3
                by_scorer:
                  - scorer: answer-relevancy
                    runs: 320
                    billed_runs: 318
                    cost: 0.64
                    avg_score: 0.81
        '400':
          description: Bad window or filter
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The class of failure.
                  details:
                    type: string
                    description: What specifically went wrong.
              example:
                error: Bad request
                details: to must be after from
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organization API key, generated in studio.sidenet.ai. Backend only —
        never in a browser.

````

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