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

# Get Performance Analytics

> Retrieves performance analytics for voice agents including ASR processing time, LLM response time, TTS generation time, latency, and error rates.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/agent-analytics/performance
openapi: 3.0.1
info:
  title: Hamsa API
  description: Trying out our transcription and media-to-text APIs
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tryhamsa.com
security: []
paths:
  /v1/agent-analytics/performance:
    get:
      summary: Get Performance Analytics
      description: >-
        Retrieves performance analytics for voice agents including ASR
        processing time, LLM response time, TTS generation time, latency, and
        error rates.
      parameters:
        - in: query
          name: voiceAgentId
          required: false
          description: >-
            The unique identifier of the voice agent. If not sent, the
            statistics will be for all voice agents.
          schema:
            type: string
            format: uuid
            example: 48f7656f-098b-4c43-b165-7cfd2cc8ac30
        - in: query
          name: period
          required: false
          description: The period filter option. Defaults to TODAY.
          schema:
            type: string
            enum:
              - LAST_HOUR
              - TODAY
              - YESTERDAY
              - THIS_WEEK
              - THIS_MONTH
              - CUSTOM
            default: TODAY
            example: TODAY
        - in: query
          name: startPeriod
          required: false
          description: >-
            The start period timestamp in milliseconds sent in string format.
            Must be sent with CUSTOM date filter.
          schema:
            type: string
            example: '1737590399000'
        - in: query
          name: endPeriod
          required: false
          description: >-
            The end period timestamp in milliseconds sent in string format. Must
            be sent with CUSTOM date filter.
          schema:
            type: string
            example: '1737590399000'
        - in: query
          name: timeDifference
          required: false
          description: >-
            The time difference between the timezone of the user's machine to
            the UTC/GMT timezone.
          schema:
            type: string
            default: '0'
            example: '-3'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPerformanceAnalyticsResponse'
        '400':
          description: Bad request - validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '500':
          description: Server Side Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    GetPerformanceAnalyticsResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            avgAsrProcessingTime:
              type: number
              description: The average of the ASR processing time in milliseconds.
              example: 5667
            avgLlmResponseTime:
              type: number
              description: The average of the LLM response time in milliseconds.
              example: 245
            avgTtsGenerationTime:
              type: number
              description: The average of the TTS generation time in milliseconds.
              example: 838
            latency:
              type: number
              description: The overall latency of the services in milliseconds.
              example: 838
            sessionsHaveErrorsPercentage:
              type: number
              description: The percentage of the sessions that have errors.
              example: 87
    ErrorSchema:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass the API key in the Authorization header, You need to put Token
        keyword before the API key. e.g. 'Authorization: Token <api-key>'

````