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

# Stream usage

> Get the usage of all processors in a stream



## OpenAPI

````yaml get /usage-service/api/v1/usage/streams/{streamId}
openapi: 3.0.1
info:
  title: Vatis Stream Service
  description: Vatis Stream Service API
  version: '1.0'
servers:
  - url: https://usage-service.vatis.tech
    description: Default server
security: []
paths:
  /usage-service/api/v1/usage/streams/{streamId}:
    get:
      tags:
        - stream-usage-resource-impl
      summary: Stream usage
      description: Get the usage of all processors in a stream
      operationId: getStreamUsage
      parameters:
        - name: streamId
          in: path
          description: Stream id
          required: true
          schema:
            type: string
            format: uuid
        - name: currency
          in: query
          description: >-
            Currency to use for the report. If not specified, the default
            credits abstraction will be used
          required: false
          schema:
            type: string
            example: USD
      responses:
        '200':
          description: Stream usage retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StreamUsageDto'
        '400':
          description: Validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Exception on client authorization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Stream usage limit reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Failed to create the stream
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '501':
          description: Requested feature is not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: One or more processors are not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        default:
          description: Default error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerToken: []
components:
  schemas:
    StreamUsageDto:
      type: object
      properties:
        creatorId:
          type: string
        groupId:
          type: string
          format: uuid
        streamId:
          type: string
          format: uuid
        streamConfigurationTemplateId:
          type: string
        currency:
          type: string
        processors:
          type: array
          items:
            $ref: '#/components/schemas/UsageRecordDto'
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
          format: int32
        title:
          type: string
        message:
          type: string
        internalErrorName:
          type: string
        nestedErrors:
          type: array
          items:
            type: object
    UsageRecordDto:
      type: object
      properties:
        creatorId:
          type: string
        groupId:
          type: string
          format: uuid
        streamId:
          type: string
          format: uuid
        processorId:
          type: string
        operationType:
          type: string
          enum:
            - BATCH_TRANSCRIPTION
            - REAL_TIME_TRANSCRIPTION
            - SPEAKERS_DIARIZATION
            - VOICE_ACTIVITY_DETECTION
            - TRANSCODE
            - TRANSLATION
            - SUMMARIZATION
            - SENTIMENT_ANALYSIS
            - NO_OPERATION
            - LLM_PROCESSING
        streamConfigurationTemplateId:
          type: string
        timestamp:
          type: integer
          format: int64
        credits:
          type: string
        executionTime:
          type: integer
          format: int64
        storageSize:
          type: integer
          format: int64
        ingressSize:
          type: integer
          format: int64
        egressSize:
          type: integer
          format: int64
        processedAudioLength:
          type: integer
          format: int64
        processedTokens:
          type: integer
          format: int64
        finalUsage:
          type: boolean
        errorOccurred:
          type: boolean
        processedInputTokens:
          type: integer
          format: int64
        processedOutputTokens:
          type: integer
          format: int64
  securitySchemes:
    bearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````