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

# Get time-bucketed request status and latency stats (deprecated)

> GoModel API reference for GET /admin/audit/stats: Get time-bucketed request status and latency stats (deprecated).



## OpenAPI

````yaml /openapi.json get /admin/audit/stats
openapi: 3.0.0
info:
  description: >-
    AI gateway routing requests to multiple LLM providers (OpenAI, Anthropic,
    Gemini, Groq, Fireworks AI, Meta, OpenRouter, Kilo AI, DeepSeek, Z.ai, xAI,
    MiniMax, Xiaomi MiMo, Mistral AI, OpenCode Go, Oracle, Ollama, Bailian).
    Drop-in OpenAI-compatible API.
  title: GoModel API
  contact: {}
  version: '1.0'
servers:
  - url: '{base_url}'
    description: Edit the base URL to point at your GoModel deployment.
    variables:
      base_url:
        default: http://localhost:8080
        description: Your GoModel deployment URL
security: []
paths:
  /admin/audit/stats:
    get:
      tags:
        - admin
      summary: Get time-bucketed request status and latency stats (deprecated)
      description: |-
        Returns request counts grouped into 2xx/4xx/5xx status classes
        per time bucket, an overall success-rate summary, and average
        request duration per provider for the dashboard charts.
        Ranges up to 3 days use hourly buckets, longer ranges daily.
      parameters:
        - description: Number of days (default 30)
          name: days
          in: query
          schema:
            type: integer
        - description: Start date (YYYY-MM-DD)
          name: start_date
          in: query
          schema:
            type: string
        - description: End date (YYYY-MM-DD)
          name: end_date
          in: query
          schema:
            type: string
        - description: Filter by tracked user path subtree
          name: user_path
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/requestlog.RequestStats'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/core.GatewayError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/core.GatewayError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/core.GatewayError'
      deprecated: true
      security:
        - BearerAuth: []
components:
  schemas:
    requestlog.RequestStats:
      type: object
      properties:
        buckets:
          type: array
          items:
            $ref: '#/components/schemas/requestlog.RequestStatsBucket'
        interval:
          type: string
        provider_latency:
          type: array
          items:
            $ref: '#/components/schemas/requestlog.ProviderLatencySeries'
        summary:
          $ref: '#/components/schemas/requestlog.RequestStatsSummary'
    core.GatewayError:
      type: object
      properties:
        code:
          type: string
          nullable: true
        message:
          type: string
        param:
          type: string
          nullable: true
        provider:
          type: string
        status_code:
          type: integer
        type:
          $ref: '#/components/schemas/core.ErrorType'
    requestlog.RequestStatsBucket:
      type: object
      properties:
        requests:
          type: integer
        start:
          type: string
        status_2xx:
          type: integer
        status_4xx:
          type: integer
        status_5xx:
          type: integer
        status_other:
          type: integer
    requestlog.ProviderLatencySeries:
      type: object
      properties:
        avg_duration_ms:
          type: array
          items:
            type: number
        provider:
          type: string
        requests:
          type: array
          items:
            type: integer
    requestlog.RequestStatsSummary:
      type: object
      properties:
        avg_duration_ms:
          type: number
        requests:
          type: integer
        status_2xx:
          type: integer
        status_4xx:
          type: integer
        status_5xx:
          type: integer
        status_other:
          type: integer
        success_rate:
          type: number
    core.ErrorType:
      type: string
      enum:
        - provider_error
        - rate_limit_error
        - invalid_request_error
        - authentication_error
        - not_found_error
        - permission_error
        - internal_error
      x-enum-varnames:
        - ErrorTypeProvider
        - ErrorTypeRateLimit
        - ErrorTypeInvalidRequest
        - ErrorTypeAuthentication
        - ErrorTypeNotFound
        - ErrorTypePermission
        - ErrorTypeInternal
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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