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

# Get Model Gateway overview

> Returns key-level OpenRouter usage and activity time series when the key has activity access.



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/ai.yaml get /api/ai/overview
openapi: 3.0.3
info:
  title: Insforge AI API
  version: 1.0.0
  description: >-
    Model Gateway helper APIs for OpenRouter key provisioning, model discovery,
    and deprecated compatibility proxy routes
servers: []
security: []
paths:
  /api/ai/overview:
    get:
      tags:
        - Admin
      summary: Get Model Gateway overview
      description: >-
        Returns key-level OpenRouter usage and activity time series when the key
        has activity access.
      responses:
        '200':
          description: Model Gateway overview
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AIOverview'
        '401':
          description: Unauthorized
        '500':
          description: Failed to fetch overview
      security:
        - bearerAuth: []
components:
  schemas:
    AIOverview:
      type: object
      properties:
        key:
          type: object
          properties:
            label:
              type: string
            limit:
              type: number
              nullable: true
            limitRemaining:
              type: number
              nullable: true
            limitReset:
              type: string
              nullable: true
            usage:
              type: number
            usageDaily:
              type: number
            usageWeekly:
              type: number
            usageMonthly:
              type: number
            isFreeTier:
              type: boolean
            observabilityAvailable:
              type: boolean
            observabilityError:
              type: string
        charts:
          type: object
          properties:
            spend:
              type: array
              items:
                $ref: '#/components/schemas/AIOverviewMetricPoint'
            requests:
              type: array
              items:
                $ref: '#/components/schemas/AIOverviewMetricPoint'
            tokens:
              type: array
              items:
                $ref: '#/components/schemas/AIOverviewMetricPoint'
        modelUsage:
          type: array
          description: Activity aggregated by model for the completed 30-day UTC window.
          items:
            $ref: '#/components/schemas/AIModelUsage'
    AIOverviewMetricPoint:
      type: object
      required:
        - label
        - value
      properties:
        label:
          type: string
        value:
          type: number
    AIModelUsage:
      type: object
      required:
        - model
        - providers
        - requests
        - promptTokens
        - completionTokens
        - reasoningTokens
        - totalTokens
        - spend
        - byokSpend
      properties:
        model:
          type: string
        providers:
          type: array
          items:
            type: string
        requests:
          type: number
        promptTokens:
          type: number
        completionTokens:
          type: number
        reasoningTokens:
          type: number
        totalTokens:
          type: number
        spend:
          type: number
        byokSpend:
          type: number
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````