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

# Get LLM cost summary

> Cost and token totals for LLM gateway traffic, with top-10 breakdowns by model, connection and user, and connections ranked by average cost per call. Costs are in cents and can be fractional. See [LLM cost](/monitor/llm-cost).

**Required permission:** `observe:read`




## OpenAPI

````yaml /api-reference/openapi.yaml get /api/v1/observe/llm-cost/summary
openapi: 3.1.0
info:
  title: Igris Management API
  version: '1'
  description: >-
    REST API for managing Igris connections, policies, sessions, audit events
    and alerts.
servers:
  - url: https://api.igrisecurity.com
security:
  - bearerAuth: []
tags:
  - name: Connections
  - name: Policies
  - name: Sessions
  - name: Audit Events
  - name: Incidents
  - name: Webhooks
  - name: API Keys
  - name: Members
  - name: LLM Providers
  - name: LLM Cost
  - name: Observe
paths:
  /api/v1/observe/llm-cost/summary:
    get:
      tags:
        - LLM Cost
      summary: Get LLM cost summary
      description: >
        Cost and token totals for LLM gateway traffic, with top-10 breakdowns by
        model, connection and user, and connections ranked by average cost per
        call. Costs are in cents and can be fractional. See [LLM
        cost](/monitor/llm-cost).


        **Required permission:** `observe:read`
      operationId: getLlmCostSummary
      parameters:
        - $ref: '#/components/parameters/CostRange'
      responses:
        '200':
          description: The summary.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      totalCents:
                        type: number
                      totalCalls:
                        type: integer
                      totalTokensIn:
                        type: integer
                      totalTokensOut:
                        type: integer
                      topModels:
                        type: array
                        items:
                          type: object
                          properties:
                            model:
                              type: string
                            cents:
                              type: number
                            calls:
                              type: integer
                            tokensIn:
                              type: integer
                            tokensOut:
                              type: integer
                      topConnections:
                        type: array
                        items:
                          type: object
                          properties:
                            slug:
                              type: string
                            cents:
                              type: number
                            calls:
                              type: integer
                      topUsers:
                        type: array
                        items:
                          type: object
                          properties:
                            userId:
                              type: string
                            cents:
                              type: number
                      connectionsByAvgCost:
                        type: array
                        items:
                          type: object
                          properties:
                            slug:
                              type: string
                            avgCents:
                              type: number
                            calls:
                              type: integer
                      range:
                        type: string
                        description: The `range` you sent.
              example:
                data:
                  totalCents: 12345.6
                  totalCalls: 4210
                  totalTokensIn: 1000000
                  totalTokensOut: 500000
                  topModels:
                    - model: gpt-4o
                      cents: 8000
                      calls: 2000
                      tokensIn: 700000
                      tokensOut: 300000
                  topConnections:
                    - slug: openai-prod
                      cents: 9000
                      calls: 3000
                  topUsers:
                    - userId: alice@company.com
                      cents: 4000
                  connectionsByAvgCost:
                    - slug: openai-prod
                      avgCents: 3.1
                      calls: 3000
                  range: 7d
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  parameters:
    CostRange:
      name: range
      in: query
      schema:
        type: string
        enum:
          - 24h
          - 7d
          - 30d
          - 90d
        default: 7d
  responses:
    Unauthorized:
      description: No valid session or API key, or the key's creator is no longer a member.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
    Forbidden:
      description: The caller lacks the required permission.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenError'
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    ForbiddenError:
      type: object
      properties:
        error:
          type: string
          example: Forbidden
        required:
          type: string
          description: The permission the caller lacks.
          example: policies:write
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: ig_...
      description: >-
        An Igris API key. It acts with the current role and permission overrides
        of the member who created it.

````

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