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

# Get usage summary

> Get usage counts and limits for current billing period (queries, indexing, oracle, etc.).



## OpenAPI

````yaml /openapi-docs.yaml get /usage
openapi: 3.1.0
info:
  title: Nia AI API
  version: 1.1.0
  description: >-
    Nia AI API provides a single, consistent `sources` resource for all indexed
    content.


    ## Core Resources


    **Sources** (`/sources`)

    - `repository`

    - `documentation`

    - `research_paper`

    - `huggingface_dataset`

    - `local_folder`


    **Search** (`/search`)

    - `mode`: query | web | deep | universal


    Legacy endpoints are deprecated and will be removed in a future version.
    Prefer `/sources` and `/search` for new integrations.
servers:
  - url: https://apigcp.trynia.ai/v2
    description: Production API
  - url: http://localhost:8000/v2
    description: Local development
security:
  - ApiKeyAuth: []
tags:
  - name: Auth
    description: API-first signup, login, and API key bootstrapping
  - name: Sources
    description: >-
      Unified source management (repositories, documentation, papers, datasets,
      local folders)
  - name: Search
    description: Unified search endpoint with mode discriminator
  - name: Context Sharing
    description: Cross-agent context management and retrieval
  - name: Categories
    description: Category management for organizing indexed sources
  - name: GitHub Search
    description: Live GitHub search and repository exploration
  - name: Advisor
    description: Context-aware code advisor against indexed documentation
  - name: Dependencies
    description: Dependency analysis and documentation subscription
  - name: Usage
    description: Usage tracking and bulk operations
paths:
  /usage:
    get:
      tags:
        - Usage
      summary: Get usage summary
      description: >-
        Get usage counts and limits for current billing period (queries,
        indexing, oracle, etc.).
      operationId: get_usage_summary_v2_v2_usage_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageSummaryResponse'
components:
  schemas:
    UsageSummaryResponse:
      properties:
        user_id:
          type: string
          title: User Id
          description: User identifier
        organization_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Id
          description: Organization identifier (if applicable)
        subscription_tier:
          type: string
          title: Subscription Tier
          description: Current subscription tier
          default: free
        billing_period_start:
          type: string
          format: date-time
          title: Billing Period Start
          description: Start of current billing period
        billing_period_end:
          type: string
          format: date-time
          title: Billing Period End
          description: End of current billing period
        usage:
          additionalProperties:
            $ref: '#/components/schemas/UsageSummaryUsageEntry'
          type: object
          title: Usage
          description: Usage breakdown by operation type
      type: object
      required:
        - user_id
        - billing_period_start
        - billing_period_end
      title: UsageSummaryResponse
      description: Response for usage summary.
    UsageSummaryUsageEntry:
      properties:
        used:
          type: integer
          title: Used
          description: Number of operations used this period
          default: 0
        limit:
          type: integer
          title: Limit
          description: Maximum allowed operations (0 if unlimited)
          default: 0
        unlimited:
          type: boolean
          title: Unlimited
          description: Whether this operation type is unlimited
          default: false
      type: object
      title: UsageSummaryUsageEntry
      description: Usage breakdown for a single operation type.
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key must be provided in the Authorization header

````