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

# Compute Health Score Endpoint

> Compute the health score metric for a metrics testing run.



## OpenAPI

````yaml https://api.galileo.ai/public/v2/openapi.json post /v2/projects/{project_id}/metrics-testing/{run_id}/health-score
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.galileo.ai
    description: Galileo Public APIs - galileo-v2
security: []
paths:
  /v2/projects/{project_id}/metrics-testing/{run_id}/health-score:
    post:
      tags:
        - data
        - prompts
        - rows
      summary: Compute Health Score Endpoint
      description: Compute the health score metric for a metrics testing run.
      operationId: >-
        compute_health_score_endpoint_v2_projects__project_id__metrics_testing__run_id__health_score_post
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            title: Project Id
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            title: Run Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComputeHealthScoreRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthScoreResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - OAuth2PasswordBearer: []
components:
  schemas:
    ComputeHealthScoreRequest:
      properties:
        scorer_id:
          type: string
          format: uuid4
          title: Scorer Id
        output_type:
          $ref: '#/components/schemas/OutputTypeEnum'
          description: The scorer's output type, used to dispatch the correct metric.
        scoreable_node_types:
          items:
            $ref: '#/components/schemas/StepType'
          type: array
          title: Scoreable Node Types
          description: >-
            The scorer's scoreable_node_types. Determines which record type
            carries the score.
        mgt_overlay:
          additionalProperties:
            anyOf:
              - type: string
              - type: 'null'
          type: object
          title: Mgt Overlay
          description: >-
            Client-side pending MGT edits: {row_id: value}. Overrides committed
            dataset values.
      type: object
      required:
        - scorer_id
        - output_type
      title: ComputeHealthScoreRequest
    HealthScoreResult:
      properties:
        health_score_type:
          anyOf:
            - $ref: '#/components/schemas/HealthScoreType'
            - type: 'null'
        value:
          anyOf:
            - type: number
            - type: 'null'
          title: Value
          description: Primary health score metric value, or None if no valid rows.
        skipped_rows:
          type: integer
          title: Skipped Rows
          description: Rows excluded because MGT or score could not be parsed.
        secondary:
          additionalProperties:
            anyOf:
              - type: number
              - type: 'null'
          type: object
          title: Secondary
          description: Secondary metrics (MAE, RMSE, R², per-class F1, etc.).
        total_scored_rows:
          type: integer
          title: Total Scored Rows
          description: Rows with a successful scorer result.
        total_mgt_rows:
          type: integer
          title: Total Mgt Rows
          description: Rows with a non-null MGT value after overlay.
        joined_rows:
          type: integer
          title: Joined Rows
          description: Rows with both a score and a MGT value (used for computation).
      type: object
      required:
        - health_score_type
        - value
        - skipped_rows
        - secondary
        - total_scored_rows
        - total_mgt_rows
        - joined_rows
      title: HealthScoreResult
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OutputTypeEnum:
      type: string
      enum:
        - boolean
        - categorical
        - count
        - discrete
        - freeform
        - percentage
        - multilabel
        - retrieved_chunk_list_boolean
        - boolean_multilabel
      title: OutputTypeEnum
      description: Enumeration of output types.
    StepType:
      type: string
      enum:
        - llm
        - retriever
        - tool
        - workflow
        - agent
        - control
        - trace
        - session
      title: StepType
    HealthScoreType:
      type: string
      enum:
        - macro_f1
        - micro_f1
        - mse
        - mae
      title: HealthScoreType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Galileo-API-Key
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: https://api.galileo.ai/login

````