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

# Get LLM token usage totals

> Totals over the same filters as the list. `total_cost_usd` adds up each row's `cost`; rows with
no cost (no provider cost and no pricing) count as zero and are reported in `unpriced_count`.



## OpenAPI

````yaml /api-referansi/openapi.json get /v1/llm-token-usages/summary
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: >-
    Flextell REST API referansı. Kimlik doğrulama, scope ve istek kuralları için
    API sekmesindeki rehberlere bakın.
servers:
  - url: https://app.flextell.ai/api
    description: Üretim
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/llm-token-usages/summary:
    get:
      tags:
        - LlmTokenUsage
      summary: Get LLM token usage totals
      description: >-
        Totals over the same filters as the list. `total_cost_usd` adds up each
        row's `cost`; rows with

        no cost (no provider cost and no pricing) count as zero and are reported
        in `unpriced_count`.
      operationId: llmTokenUsage.summary
      parameters:
        - name: llm_id
          in: query
          description: Filter by the model record ID.
          schema:
            type:
              - integer
              - 'null'
            minimum: 1
        - name: model
          in: query
          description: >-
            Filter by the model name as recorded on the usage (e.g.
            `openai/gpt-4.1`).
          schema:
            type:
              - string
              - 'null'
            maxLength: 255
        - name: llm_role
          in: query
          description: Filter by the role the model was called for.
          schema:
            anyOf:
              - $ref: '#/components/schemas/LlmUsageRole'
              - type: 'null'
        - name: created_at_from
          in: query
          description: Filter records created on or after this date.
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: created_at_to
          in: query
          description: Filter records created on or before this date.
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: X-Tenant
          in: header
          required: true
          description: >-
            Tenant identifier. Send the Tenant ID in the `X-Tenant` header to
            scope API requests to a specific tenant.
          schema:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      total_tokens:
                        type: integer
                      total_cost_usd:
                        type: number
                      max_total_token:
                        type: integer
                      usage_count:
                        type: integer
                      unpriced_count:
                        type: integer
                    required:
                      - total_tokens
                      - total_cost_usd
                      - max_total_token
                      - usage_count
                      - unpriced_count
                required:
                  - success
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
        '428':
          description: >-
            Mandatory setup is incomplete. Finish the setup wizard first;
            `data.next_step` names the step to continue with.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    examples:
                      - false
                  error_code:
                    type: string
                    enum:
                      - SETUP_REQUIRED
                    examples:
                      - SETUP_REQUIRED
                  message:
                    type: string
                    examples:
                      - Complete the required setup steps to continue.
                  data:
                    type: object
                    properties:
                      next_step:
                        type:
                          - string
                          - 'null'
                        examples:
                          - clinic_info
                    required:
                      - next_step
                required:
                  - success
                  - error_code
                  - message
                  - data
components:
  schemas:
    LlmUsageRole:
      type: string
      enum:
        - flexy_chat
        - greeter
        - info
        - booking
        - intake
        - support
        - spam
        - router
        - intake_router
        - intent_splitter
        - reply_format
        - ai_report
        - booking_summary
        - treatment_summary
        - product_summary
        - transcription
      title: LlmUsageRole
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.flextell.ai/oauth/authorize
          tokenUrl: https://app.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````

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