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

# Get Usage

> Get the authenticated organization's billed usage as daily or monthly spans of line items, broken out by product, processor, app, and API key.



## OpenAPI

````yaml https://api.parallel.ai/account/service/openapi.json get /service/v1/usage
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.parallel.ai/account
    description: Parallel Account API
security: []
tags:
  - name: Apps
    description: Application management endpoints
  - name: Keys
    description: API key management endpoints
  - name: Balance
    description: Organization balance endpoints
  - name: Usage
    description: Organization usage endpoints
  - name: Service
    description: Service utility endpoints
paths:
  /service/v1/usage:
    get:
      tags:
        - Usage
      summary: Get Usage
      description: >-
        Get the authenticated organization's billed usage as daily or monthly
        spans of line items, broken out by product, processor, app, and API key.
      operationId: get_usage_service_v1_usage_get
      parameters:
        - name: start_date
          in: query
          required: true
          schema:
            type: string
            format: date
            description: UTC start date, inclusive. Must be within the last 365 days.
            title: Start Date
          description: UTC start date, inclusive. Must be within the last 365 days.
        - name: end_date
          in: query
          required: true
          schema:
            type: string
            format: date
            description: UTC end date, exclusive. Window of at most 365 days.
            title: End Date
          description: UTC end date, exclusive. Window of at most 365 days.
        - name: interval
          in: query
          required: false
          schema:
            enum:
              - daily
              - monthly
            type: string
            description: >-
              Span granularity. 'daily' returns one span per UTC day; 'monthly'
              returns one span per UTC calendar month, clamped to the requested
              window, with that month's line items summed.
            default: daily
            title: Interval
          description: >-
            Span granularity. 'daily' returns one span per UTC day; 'monthly'
            returns one span per UTC calendar month, clamped to the requested
            window, with that month's line items summed.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    UsageResponse:
      properties:
        usage:
          items:
            $ref: '#/components/schemas/UsageSpanResponse'
          type: array
          title: Usage
          description: Usage spans, ascending by start time
      type: object
      title: UsageResponse
      description: Usage spans for the authenticated organization.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UsageSpanResponse:
      properties:
        start_time:
          type: string
          format: date-time
          title: Start Time
          description: Span start, inclusive (UTC)
        end_time:
          type: string
          format: date-time
          title: End Time
          description: Span end, exclusive (UTC)
        line_items:
          items:
            $ref: '#/components/schemas/UsageLineItemResponse'
          type: array
          title: Line Items
          description: Usage breakdown for this span
      type: object
      required:
        - start_time
        - end_time
      title: UsageSpanResponse
      description: Usage line items for one UTC day or calendar month.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    UsageLineItemResponse:
      properties:
        product:
          type: string
          title: Product
          description: Billed product name, as it appears on invoices
        api_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Key Id
          description: >-
            API key the usage was billed under; null when the usage is not
            attributed to a specific key
        api_key_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Key Name
          description: >-
            Display name of that API key; null when the usage is not attributed
            to a key or the key has since been deleted or rotated
        app_name:
          anyOf:
            - type: string
            - type: 'null'
          title: App Name
          description: App the usage was billed under, when grouped
        processor:
          anyOf:
            - type: string
            - type: 'null'
          title: Processor
          description: Processor the usage was billed under, when grouped
        quantity:
          type: number
          title: Quantity
          description: Billed usage quantity
        total_cost_cents:
          type: number
          title: Total Cost Cents
          description: Total cost of this line item in cents (quantity already applied)
        currency:
          type: string
          title: Currency
          description: Currency code, e.g. USD
      type: object
      required:
        - product
        - quantity
        - total_cost_cents
        - currency
      title: UsageLineItemResponse
      description: One billed usage line item within a time span.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Send `Authorization: Bearer <access_token>`. This must be an account API
        access token minted via a supported Parallel OAuth grant, not a standard
        API key. See the [account API docs](/integrations/account-api).

````