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

# Get deployment metrics timeseries



## OpenAPI

````yaml /api-reference/openapi.json get /v1/deployments/{deployment_id}/metrics/timeseries
openapi: 3.1.0
info:
  title: Veri API
  description: >-
    REST API for the Veri RL post-training platform. All requests require a
    Bearer API key (`vk_` prefix).
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://api.veri.studio
    description: Production
security: []
tags:
  - name: Training jobs
    description: Create, monitor, and manage training jobs.
  - name: Datasets
    description: Upload and connect training datasets.
  - name: Reward functions
    description: Upload and manage reward functions.
  - name: Deployments
    description: Serve trained models and run inference.
  - name: Evaluations
    description: Score models against datasets and benchmarks.
  - name: Volumes
    description: Persistent file storage mounted into jobs.
  - name: Models
    description: Custom model registry deployments serve from.
  - name: Regions
    description: Discover available launch regions.
  - name: GPU
    description: Live GPU availability by provider and region.
  - name: Code artifacts
    description: Upload custom training script bundles.
  - name: Billing
    description: Credit balance and transaction history.
  - name: API keys
    description: Create and revoke API keys.
  - name: Account
    description: The authenticated caller's identity.
  - name: SSH keys
    description: Manage SSH key pairs for compute access.
  - name: Settings
    description: Account-level integrations (Weights & Biases).
paths:
  /v1/deployments/{deployment_id}/metrics/timeseries:
    get:
      tags:
        - Deployments
      summary: Get deployment metrics timeseries
      operationId: metrics_timeseries
      parameters:
        - name: deployment_id
          in: path
          description: Deployment ID
          required: true
          schema:
            type: string
        - name: from
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: interval
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/MetricsInterval'
        - name: replica_id
          in: query
          description: >-
            Scope buckets, summary, and cost to one replica of the deployment
            (404

            when the replica doesn't belong to it). Omitted = deployment-wide.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Server-filled inference metrics buckets
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentMetricsTimeseries'
        '400':
          description: Invalid range or interval
        '404':
          description: Not found or not owned by the caller
      security:
        - bearerAuth: []
components:
  schemas:
    MetricsInterval:
      type: string
      enum:
        - auto
        - minute
        - five_minutes
        - hour
        - day
    DeploymentMetricsTimeseries:
      type: object
      required:
        - object
        - deployment_id
        - from
        - to
        - interval
        - summary
        - buckets
      properties:
        object:
          type: string
        deployment_id:
          type: string
        from:
          type: string
          format: date-time
        to:
          type: string
          format: date-time
        interval:
          $ref: '#/components/schemas/MetricsInterval'
        replica_id:
          type:
            - string
            - 'null'
          description: >-
            Set when the response is scoped to one replica (?replica_id=);
            absent

            for deployment-wide scope.
        summary:
          $ref: '#/components/schemas/DeploymentMetricsSummary'
        buckets:
          type: array
          items:
            $ref: '#/components/schemas/DeploymentMetricsBucket'
        cost_efficiency:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/DeploymentCostEfficiency'
    DeploymentMetricsSummary:
      type: object
      required:
        - requests
        - successfulRequests
        - clientErrors
        - serverErrors
        - promptTokens
        - cachedPromptTokens
        - completionTokens
        - errorRate
        - ttft_ms
        - e2e_ms
        - tpot_ms
      properties:
        requests:
          type: integer
          format: int64
        successfulRequests:
          type: integer
          format: int64
        clientErrors:
          type: integer
          format: int64
        serverErrors:
          type: integer
          format: int64
        promptTokens:
          type: integer
          format: int64
        cachedPromptTokens:
          type: integer
          format: int64
        completionTokens:
          type: integer
          format: int64
        errorRate:
          type: number
          format: double
        ttft_ms:
          $ref: '#/components/schemas/MetricPercentiles'
        e2e_ms:
          $ref: '#/components/schemas/MetricPercentiles'
        tpot_ms:
          $ref: '#/components/schemas/MetricPercentiles'
    DeploymentMetricsBucket:
      type: object
      required:
        - timestamp
        - requests
        - successful_requests
        - client_errors
        - server_or_stream_errors
        - request_rate_per_second
        - error_rate
        - prompt_tokens
        - cached_prompt_tokens
        - completion_tokens
        - output_tokens_per_second
        - ttft_ms
        - e2e_ms
        - tpot_ms
      properties:
        timestamp:
          type: string
          format: date-time
        requests:
          type: integer
          format: int64
        successful_requests:
          type: integer
          format: int64
        client_errors:
          type: integer
          format: int64
        server_or_stream_errors:
          type: integer
          format: int64
        request_rate_per_second:
          type: number
          format: double
        error_rate:
          type: number
          format: double
        prompt_tokens:
          type: integer
          format: int64
        cached_prompt_tokens:
          type: integer
          format: int64
        completion_tokens:
          type: integer
          format: int64
        output_tokens_per_second:
          type: number
          format: double
        ttft_ms:
          $ref: '#/components/schemas/MetricPercentiles'
        e2e_ms:
          $ref: '#/components/schemas/MetricPercentiles'
        tpot_ms:
          $ref: '#/components/schemas/MetricPercentiles'
    DeploymentCostEfficiency:
      type: object
      required:
        - cost_usd
      properties:
        cost_usd:
          type: number
          format: double
        cost_per_request_usd:
          type:
            - number
            - 'null'
          format: double
        cost_per_million_tokens_usd:
          type:
            - number
            - 'null'
          format: double
        tokens_per_dollar:
          type:
            - number
            - 'null'
          format: double
    MetricPercentiles:
      type: object
      required:
        - samples
      properties:
        samples:
          type: integer
          format: int64
        p50:
          type:
            - number
            - 'null'
          format: double
        p90:
          type:
            - number
            - 'null'
          format: double
        p95:
          type:
            - number
            - 'null'
          format: double
        p99:
          type:
            - number
            - 'null'
          format: double
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: API key with the `vk_` prefix. Create one from the dashboard.

````