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

# Get total cost for a given period



## OpenAPI

````yaml get /v1/usage/total-cost
openapi: 3.0.0
info:
  title: Usage API
  version: 1.1.0
  description: API for retrieving usage information and costs
servers: []
security: []
paths:
  /v1/usage/total-cost:
    get:
      tags:
        - Usage
      summary: Get total cost for a given period
      parameters:
        - in: query
          name: start_date
          schema:
            type: string
            format: date
          required: true
        - in: query
          name: end_date
          schema:
            type: string
            format: date
          required: true
      responses:
        '200':
          description: Total cost retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TotalCostResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    TotalCostResponse:
      type: object
      properties:
        start_date:
          type: string
          format: date
        end_date:
          type: string
          format: date
        total_cost:
          type: number
          format: float
    ErrorResponse:
      type: object
      properties:
        status:
          type: integer
        message:
          type: string
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````