> ## Documentation Index
> Fetch the complete documentation index at: https://gomodel-docs-benchmark-writeup-and-tooling.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get usage breakdown by period



## OpenAPI

````yaml /openapi.json get /admin/usage/daily
openapi: 3.0.0
info:
  description: >-
    AI gateway routing requests to multiple LLM providers (OpenAI, Anthropic,
    Gemini, Groq, OpenRouter, DeepSeek, Z.ai, xAI, MiniMax, Xiaomi MiMo,
    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/usage/daily:
    get:
      tags:
        - admin
      summary: Get usage breakdown by period
      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: 'Grouping interval: daily, weekly, monthly, yearly (default daily)'
          name: interval
          in: query
          schema:
            type: string
        - description: Filter by tracked user path subtree
          name: user_path
          in: query
          schema:
            type: string
        - description: 'Cache mode filter: uncached, cached, all (default uncached)'
          name: cache_mode
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/usage.DailyUsage'
        '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'
      security:
        - BearerAuth: []
components:
  schemas:
    usage.DailyUsage:
      type: object
      properties:
        date:
          type: string
        input_cost:
          type: number
        input_tokens:
          type: integer
        output_cost:
          type: number
        output_tokens:
          type: integer
        requests:
          type: integer
        total_cost:
          type: number
        total_tokens:
          type: integer
    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'
    core.ErrorType:
      type: string
      enum:
        - provider_error
        - rate_limit_error
        - invalid_request_error
        - authentication_error
        - not_found_error
      x-enum-varnames:
        - ErrorTypeProvider
        - ErrorTypeRateLimit
        - ErrorTypeInvalidRequest
        - ErrorTypeAuthentication
        - ErrorTypeNotFound
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````