> ## 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 timeseries

> Daily LLM cost and call counts per provider, oldest day first. Costs are in cents and can be fractional.

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




## OpenAPI

````yaml /api-reference/openapi.yaml get /api/v1/observe/llm-cost/timeseries
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/timeseries:
    get:
      tags:
        - LLM Cost
      summary: Get LLM cost timeseries
      description: >
        Daily LLM cost and call counts per provider, oldest day first. Costs are
        in cents and can be fractional.


        **Required permission:** `observe:read`
      operationId: getLlmCostTimeseries
      parameters:
        - $ref: '#/components/parameters/CostRange'
      responses:
        '200':
          description: One row per day and provider.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          format: date-time
                          description: Start of the day (UTC).
                        provider:
                          type:
                            - string
                            - 'null'
                        cents:
                          type: number
                        calls:
                          type: integer
              example:
                data:
                  - date: '2026-01-01T00:00:00.000Z'
                    provider: openai
                    cents: 1200
                    calls: 400
                  - date: '2026-01-01T00:00:00.000Z'
                    provider: anthropic
                    cents: 640.5
                    calls: 150
        '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.