> ## 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 paginated usage log entries



## OpenAPI

````yaml /openapi.json get /admin/usage/log
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/log:
    get:
      tags:
        - admin
      summary: Get paginated usage log entries
      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 model name
          name: model
          in: query
          schema:
            type: string
        - description: Filter by provider name or provider type
          name: provider
          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
        - description: Search across model, provider, request_id, provider_id
          name: search
          in: query
          schema:
            type: string
        - description: Page size (default 50, max 200)
          name: limit
          in: query
          schema:
            type: integer
        - description: Offset for pagination
          name: offset
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/usage.UsageLogResult'
        '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.UsageLogResult:
      type: object
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/usage.UsageLogEntry'
        limit:
          type: integer
        offset:
          type: integer
        total:
          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'
    usage.UsageLogEntry:
      type: object
      properties:
        cache_type:
          type: string
        cache_write_input_tokens:
          type: integer
        cached_input_ratio:
          type: number
        cached_input_tokens:
          type: integer
        cost_source:
          type: string
        costs_calculation_caveat:
          type: string
        endpoint:
          type: string
        id:
          type: string
        input_cost:
          type: number
        input_tokens:
          type: integer
        model:
          type: string
        output_cost:
          type: number
        output_tokens:
          type: integer
        provider:
          type: string
        provider_id:
          type: string
        provider_name:
          type: string
        raw_data:
          type: object
          additionalProperties: {}
        request_id:
          type: string
        timestamp:
          type: string
        total_cost:
          type: number
        total_tokens:
          type: integer
        uncached_input_tokens:
          type: integer
        user_path:
          type: string
    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

````