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

# Get Model Live Metrics



## OpenAPI

````yaml https://api.truestate.io/openapi.json get /models/{model_id}/live-metrics/
openapi: 3.1.0
info:
  title: TrueState Backend API
  summary: >-
    TrueState is an AI platform for business users to create high-impact AI
    solutions.
  description: >

    This **[TrueState](https://www.truestate.io/)** backend API allows our
    clients to automate and more powerfully retrieve and modify data from the
    TrueState platform.


    Example use cases include:


    - Accessing embeddings for a dataset.

    - Automating the process of dataset creation and model retraining as your
    data changes.

    - Much more.


    Our backend is built using the [FastAPI](https://fastapi.tiangolo.com/)
    framework in python

    using [Auth0](https://auth0.com/) and [Client API
    Keys](https://www.truestate.io/dawn/docs) for internal an external
    authentication, respectively.

    Our backend is designed to be secure, scalable, easy to use and well
    documented _(each router with its own linked docs page)_.

    Clients can only access data from their own organisation, as setup in Auth0
    our the Client API Keys. See how
    **[here](https://www.truestate.io/dawn/docs)**.


    **PS**: You can view this API documentation in either
    **[Swagger](swagger/docs)** or **[Redoc](redoc/)**, but only the swagger
    lets you test calls.
  contact:
    name: True State Support
    url: https://www.truestate.io/dawn/docs
    email: support@truestate.io
  license:
    name: Private
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 0.13.95
servers: []
security: []
paths:
  /models/{model_id}/live-metrics/:
    get:
      tags:
        - models
      summary: Get Model Live Metrics
      operationId: get_model_live_metrics_models__model_id__live_metrics__get
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Model Id
        - name: Api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LiveTrainingMetricsRead'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    LiveTrainingMetricsRead:
      properties:
        schema_version:
          type: string
          title: Schema Version
          default: training-metrics.v3
        status:
          type: string
          title: Status
        sequence:
          type: integer
          title: Sequence
          default: 0
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        metrics:
          additionalProperties: true
          type: object
          title: Metrics
        series:
          additionalProperties: true
          type: object
          title: Series
        primary_metric:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Primary Metric
        active_segment:
          type: integer
          minimum: 0
          title: Active Segment
          default: 0
        segments:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Segments
        resources:
          additionalProperties: true
          type: object
          title: Resources
        lifecycle:
          $ref: '#/components/schemas/TrainingLifecycleRead'
      type: object
      required:
        - status
        - lifecycle
      title: LiveTrainingMetricsRead
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TrainingLifecycleRead:
      properties:
        current_phase:
          $ref: '#/components/schemas/TrainingLifecyclePhase'
        phase_started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Phase Started At
        elapsed_seconds:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Elapsed Seconds
        heartbeat_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Heartbeat At
        heartbeat_source:
          anyOf:
            - type: string
            - type: 'null'
          title: Heartbeat Source
        latest_log:
          anyOf:
            - $ref: '#/components/schemas/TrainingLifecycleLogRead'
            - type: 'null'
        phases:
          items:
            $ref: '#/components/schemas/TrainingLifecyclePhaseRead'
          type: array
          title: Phases
      type: object
      required:
        - current_phase
      title: TrainingLifecycleRead
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TrainingLifecyclePhase:
      type: string
      enum:
        - queued
        - scheduling
        - image_pull
        - pod_runtime_startup
        - data_loading
        - model_gpu_initialization
        - training
        - artifact_upload
        - finalization
      title: TrainingLifecyclePhase
    TrainingLifecycleLogRead:
      properties:
        timestamp:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Timestamp
        message:
          type: string
          title: Message
        source:
          type: string
          title: Source
      type: object
      required:
        - message
        - source
      title: TrainingLifecycleLogRead
    TrainingLifecyclePhaseRead:
      properties:
        name:
          $ref: '#/components/schemas/TrainingLifecyclePhase'
        status:
          $ref: '#/components/schemas/TrainingLifecyclePhaseStatus'
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        finished_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Finished At
        elapsed_seconds:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Elapsed Seconds
      type: object
      required:
        - name
        - status
      title: TrainingLifecyclePhaseRead
    TrainingLifecyclePhaseStatus:
      type: string
      enum:
        - pending
        - active
        - completed
        - failed
        - cancelled
        - skipped
      title: TrainingLifecyclePhaseStatus
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````