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

# Usage totals for a period

> Total your calls over a period, broken down by endpoint, with your remaining credits.



## OpenAPI

````yaml /suite/api-reference/openapi.json get /usage/v1/summary
openapi: 3.1.0
info:
  title: Privue API Suite
  description: >-
    Identity and account verification against government and banking sources.


    **Authentication.** Every request takes your API key as a bearer token:
    `Authorization: Bearer <your-key>`. A successful call to a billed endpoint
    deducts one credit; a call that fails is not charged.


    **Versioning.** Each endpoint is versioned on its own, directly in its path.
    A new version of one endpoint never moves another, so no release requires
    migrating every integration at once.


    **Retention.** Nothing you send and nothing we return is stored. Documents
    are returned as the issuer's own download links, and the response is the
    only copy, so retrieve what you need when you receive it. We record that a
    call happened, for billing and audit, never what it was about.
  version: 1.0.0
servers:
  - url: https://api.privue.ai
    description: Production
security: []
paths:
  /usage/v1/summary:
    get:
      tags:
        - Usage
      summary: Usage totals for a period
      description: >-
        Total your calls over a period, broken down by endpoint, with your
        remaining credits.
      operationId: usage_summary
      parameters:
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: First day to count, inclusive
            title: From
          description: First day to count, inclusive
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: Last day to count, inclusive
            title: To
          description: Last day to count, inclusive
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageSummary'
        default:
          description: The request failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    UsageSummary:
      properties:
        start:
          type: string
          format: date
          title: Start
          description: First day counted, inclusive
        end:
          type: string
          format: date
          title: End
          description: Last day counted, inclusive
        total_calls:
          type: integer
          title: Total Calls
          description: Calls made over the period, successful or not
        billed_calls:
          type: integer
          title: Billed Calls
          description: Calls that deducted a credit
        failed_calls:
          type: integer
          title: Failed Calls
          description: Calls that returned an error and were not charged
        credits_remaining:
          anyOf:
            - type: integer
            - type: 'null'
          title: Credits Remaining
          description: >-
            Credits left on the key that made this request, absent when it has
            no limit
        by_operation:
          items:
            $ref: '#/components/schemas/OperationUsage'
          type: array
          title: By Operation
          description: The same totals, broken down by endpoint
      type: object
      required:
        - start
        - end
        - total_calls
        - billed_calls
        - failed_calls
      title: UsageSummary
      description: Totals for a period, with the credit balance as it stands now.
    ErrorResponse:
      properties:
        code:
          type: integer
          title: Code
          description: HTTP status code of the response
        timestamp:
          type: integer
          title: Timestamp
          description: Unix millisecond timestamp of when the response was produced
        message:
          type: string
          title: Message
          description: What went wrong, in one sentence
        transaction_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Transaction Id
          description: >-
            Identifier for the call, present when it reached the source. Quote
            it when raising a query
      type: object
      required:
        - code
        - timestamp
        - message
      title: ErrorResponse
      description: Why a request failed.
    OperationUsage:
      properties:
        operation:
          type: string
          title: Operation
          description: The operation called, as endpoint and action
        version:
          type: string
          title: Version
          description: Version of that endpoint which served the calls
        calls:
          type: integer
          title: Calls
          description: Calls made, successful or not
        billed_calls:
          type: integer
          title: Billed Calls
          description: Calls that deducted a credit
        failed_calls:
          type: integer
          title: Failed Calls
          description: Calls that returned an error and were not charged
      type: object
      required:
        - operation
        - version
        - calls
        - billed_calls
        - failed_calls
      title: OperationUsage
      description: What one endpoint was used for over the period.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````