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

# Get endpoint analytics

> Returns aggregated request, token, latency, throughput, error, and resource-utilization metrics for an endpoint over a time range. Optionally includes time-series buckets and a per-deployment breakdown.



## OpenAPI

````yaml GET /projects/{projectId}/endpoints/{id}/analytics
openapi: 3.1.0
info:
  title: Together APIs
  description: The Together REST API. See https://docs.together.ai for more details.
  version: 2.0.0
  termsOfService: https://www.together.ai/terms-of-service
  contact:
    name: Together Support
    url: https://www.together.ai/contact
  license:
    name: MIT
    url: https://github.com/togethercomputer/openapi/blob/main/LICENSE
servers:
  - url: https://api.together.ai/v1
    description: Default environment for APIs
  - url: https://api-inference.together.ai/v2
    description: Optimized environment for inference
security:
  - bearerAuth: []
paths:
  /projects/{projectId}/endpoints/{id}/analytics:
    get:
      tags:
        - EndpointService
      summary: Get endpoint analytics
      description: >-
        Returns aggregated request, token, latency, throughput, error, and
        resource-utilization metrics for an endpoint over a time range.
        Optionally includes time-series buckets and a per-deployment breakdown.
      operationId: EndpointService_GetEndpointAnalytics
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            description: Project identifier.
            type: string
        - name: id
          in: path
          required: true
          schema:
            description: Endpoint identifier.
            type: string
        - name: deploymentId
          in: query
          schema:
            type: string
            description: Restrict to a single deployment under this endpoint.
        - name: startTime
          in: query
          schema:
            type: string
            format: date-time
            description: >-
              Inclusive start of the time range. Defaults to 24 hours ago if
              unset.
        - name: endTime
          in: query
          schema:
            type: string
            format: date-time
            description: Exclusive end of the time range. Defaults to now if unset.
        - name: includeTimeSeries
          in: query
          schema:
            type: boolean
            description: When true, include per-bucket time series in the response.
        - name: granularity
          in: query
          schema:
            type: string
            description: >-
              Time-series bucket duration, such as `1m`, `1h`, or `1d`. Defaults
              to `1d`.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DE.AnalyticsData'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorData'
      servers:
        - url: https://api.together.ai/v2
components:
  schemas:
    DE.AnalyticsData:
      type: object
      properties:
        endpointId:
          type: string
          description: ID of the endpoint summarized by these analytics.
        timeRange:
          $ref: '#/components/schemas/DE.MetricsTimeRange'
          description: Closed-open time range covered by the analytics.
        metrics:
          allOf:
            - $ref: '#/components/schemas/DE.EndpointMetrics'
          description: Aggregated metrics over the time range.
        timeSeries:
          type: array
          items:
            $ref: '#/components/schemas/DE.TimeSeriesDataPoint'
          description: >-
            Per-bucket metric samples, included only when `includeTimeSeries` is
            true.
        deploymentAnalytics:
          type: array
          items:
            $ref: '#/components/schemas/DE.DeploymentAnalyticsData'
          description: Per-deployment analytics.
      description: >-
        Endpoint-wide usage and performance analytics with optional time-series
        and per-deployment breakdowns.
    ErrorData:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              nullable: false
            type:
              type: string
              nullable: false
            param:
              type: string
              nullable: true
              default: null
            code:
              type: string
              nullable: true
              default: null
          required:
            - type
            - message
    DE.MetricsTimeRange:
      type: object
      properties:
        startTime:
          type: string
          description: Inclusive start of the time range.
          format: date-time
        endTime:
          type: string
          description: Exclusive end of the time range.
          format: date-time
      description: Closed-open time range used by metrics and analytics responses.
    DE.EndpointMetrics:
      type: object
      properties:
        endpointId:
          type: string
          description: The endpoint these metrics describe.
        timeRange:
          allOf:
            - $ref: '#/components/schemas/DE.MetricsTimeRange'
          description: Time range covered by the metrics.
        requestMetrics:
          $ref: '#/components/schemas/DE.RequestMetrics'
          description: Request counts and rates.
        latencyMetrics:
          $ref: '#/components/schemas/DE.LatencyMetrics'
          description: >-
            Time-to-first-token, end-to-end, and inter-token latency
            percentiles.
        throughputMetrics:
          $ref: '#/components/schemas/DE.ThroughputMetrics'
          description: Token, request, and batching throughput.
        errorMetrics:
          $ref: '#/components/schemas/DE.ErrorMetrics'
          description: Error rate and counts by error type.
        resourceUtilization:
          $ref: '#/components/schemas/DE.ResourceUtilization'
          description: Average CPU, GPU, memory, and network utilization.
        tokenMetrics:
          $ref: '#/components/schemas/DE.TokenMetrics'
          description: Input and output token totals and averages.
        deploymentMetrics:
          type: array
          items:
            $ref: '#/components/schemas/DE.DeploymentMetrics'
          description: Per-deployment breakdown, if the endpoint has multiple deployments.
      description: >-
        Operational metrics aggregated across all deployments receiving traffic
        for an endpoint.
    DE.TimeSeriesDataPoint:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Start time of the metric bucket.
        values:
          type: object
          additionalProperties:
            type: number
          description: Metric names mapped to their numeric values for this bucket.
      description: Timestamped bucket containing one or more named metric values.
    DE.DeploymentAnalyticsData:
      type: object
      properties:
        deploymentId:
          type: string
          description: ID of the deployment summarized by these analytics.
        endpointId:
          type: string
          description: ID of the deployment's parent endpoint.
        timeRange:
          $ref: '#/components/schemas/DE.MetricsTimeRange'
          description: Closed-open time range covered by the analytics.
        metrics:
          $ref: '#/components/schemas/DE.DeploymentMetrics'
          description: Aggregate operational metrics for the deployment.
        timeSeries:
          type: array
          items:
            $ref: '#/components/schemas/DE.TimeSeriesDataPoint'
          description: Per-bucket metric samples for the deployment.
      description: Usage and performance analytics for one deployment under an endpoint.
    DE.RequestMetrics:
      type: object
      properties:
        totalRequests:
          type: string
          description: Total requests received during the time range.
        successfulRequests:
          type: string
          description: Requests completed successfully during the time range.
        failedRequests:
          type: string
          description: Requests that failed during the time range.
        requestsPerSecond:
          type: number
          description: Average requests per second over the time range.
        requestsByStatusCode:
          type: object
          additionalProperties:
            type: string
          description: Request counts keyed by HTTP status code.
      description: Request counts, rate, and status-code distribution over a time range.
    DE.LatencyMetrics:
      type: object
      properties:
        ttftP50Ms:
          type: number
          description: 50th-percentile time to first token, in milliseconds.
        ttftP90Ms:
          type: number
          description: 90th-percentile time to first token, in milliseconds.
        ttftP99Ms:
          type: number
          description: 99th-percentile time to first token, in milliseconds.
        latencyP50Ms:
          type: number
          description: 50th-percentile end-to-end request latency, in milliseconds.
        latencyP90Ms:
          type: number
          description: 90th-percentile end-to-end request latency, in milliseconds.
        latencyP99Ms:
          type: number
          description: 99th-percentile end-to-end request latency, in milliseconds.
        itlP50Ms:
          type: number
          description: 50th-percentile inter-token latency, in milliseconds.
        itlP90Ms:
          type: number
          description: 90th-percentile inter-token latency, in milliseconds.
        itlP99Ms:
          type: number
          description: 99th-percentile inter-token latency, in milliseconds.
      description: >-
        Time-to-first-token, end-to-end, and inter-token latency percentiles in
        milliseconds.
    DE.ThroughputMetrics:
      type: object
      properties:
        tokensPerSecond:
          type: number
          description: Average generated tokens per second.
        requestsPerSecond:
          type: number
          description: Average completed requests per second.
        avgBatchSize:
          type: number
          description: Average number of requests processed in each runtime batch.
        avgBatchDepth:
          type: number
          description: Average number of batches queued or in flight in the serving engine.
      description: Token, request, and batching throughput over a time range.
    DE.ErrorMetrics:
      type: object
      properties:
        errorRate:
          type: number
          description: Percentage in [0, 100].
        errorsByType:
          type: object
          additionalProperties:
            type: string
          description: >-
            Counts of errors keyed by error type (e.g. HTTP status code or error
            kind).
      description: >-
        Error rate and aggregate counts by error type. Individual error samples
        are not included.
    DE.ResourceUtilization:
      type: object
      properties:
        cpuUtilization:
          type: number
          description: Average CPU utilization across replicas, as a percentage.
        gpuUtilization:
          type: number
          description: Average GPU compute utilization across replicas, as a percentage.
        memoryUtilization:
          type: number
          description: Average system memory utilization across replicas, as a percentage.
        gpuMemoryUtilization:
          type: number
          description: Average GPU memory utilization across replicas, as a percentage.
        networkBandwidthMbps:
          type: number
          description: Average network throughput across replicas, in megabits per second.
      description: >-
        Average compute, memory, and network utilization for replicas over a
        time range.
    DE.TokenMetrics:
      type: object
      properties:
        totalInputTokens:
          type: string
          description: Total input tokens processed during the time range.
        totalOutputTokens:
          type: string
          description: Total output tokens generated during the time range.
        avgInputTokens:
          type: number
          description: Average input tokens per request.
        avgOutputTokens:
          type: number
          description: Average output tokens per request.
      description: Aggregate and per-request token usage over a time range.
    DE.DeploymentMetrics:
      type: object
      properties:
        deploymentId:
          type: string
          description: ID of the deployment summarized by these metrics.
        endpointId:
          type: string
          description: ID of the deployment's parent endpoint.
        timeRange:
          $ref: '#/components/schemas/DE.MetricsTimeRange'
          description: Closed-open time range covered by the metrics.
        requestMetrics:
          $ref: '#/components/schemas/DE.RequestMetrics'
          description: Request counts and rates.
        latencyMetrics:
          $ref: '#/components/schemas/DE.LatencyMetrics'
          description: >-
            Time-to-first-token, end-to-end, and inter-token latency
            percentiles.
        throughputMetrics:
          $ref: '#/components/schemas/DE.ThroughputMetrics'
          description: Token, request, and batching throughput.
        errorMetrics:
          $ref: '#/components/schemas/DE.ErrorMetrics'
          description: Error rate and counts by error type.
        resourceUtilization:
          $ref: '#/components/schemas/DE.ResourceUtilization'
          description: Average CPU, GPU, memory, and network utilization.
        tokenMetrics:
          $ref: '#/components/schemas/DE.TokenMetrics'
          description: Input and output token totals and averages.
      description: Operational metrics for one deployment under an endpoint.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-bearer-format: bearer
      x-default: default

````