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

# Compare metrics across multiple runs

> Returns per-run aggregates (count, min, max, mean, final) for a single metric across multiple runs, read from the pre-computed summaries table. Raw, no editorializing — interpretation is the caller's job.



## OpenAPI

````yaml /pluto/api-reference/openapi.json get /api/runs/compare
openapi: 3.0.0
info:
  title: mlop API
  version: 1.0.0
  description: API for mlop - ML experiment tracking platform
servers:
  - url: https://pluto-api.trainy.ai
    description: API Server
security:
  - bearerAuth: []
paths:
  /api/runs/compare:
    get:
      tags:
        - Runs
      summary: Compare metrics across multiple runs
      description: >-
        Returns per-run aggregates (count, min, max, mean, final) for a single
        metric across multiple runs, read from the pre-computed summaries table.
        Raw, no editorializing — interpretation is the caller's job.
      parameters:
        - schema:
            type: string
            description: Comma-separated list of run IDs to compare (e.g., '1,2,5')
          required: true
          name: runIds
          in: query
        - schema:
            type: string
            description: Project name
          required: true
          name: projectName
          in: query
        - schema:
            type: string
            description: Metric name to compare (e.g., 'train/loss')
          required: true
          name: logName
          in: query
      responses:
        '200':
          description: Comparison results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompareRunsResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    CompareRunsResponse:
      type: object
      properties:
        projectName:
          type: string
        logName:
          type: string
        comparisonUrl:
          type: string
          description: URL to compare these runs in the UI
        runs:
          type: array
          items:
            type: object
            properties:
              runId:
                type: number
              runName:
                type: string
              url:
                type: string
                description: URL to view this run
              status:
                type: string
              config:
                nullable: true
              stats:
                type: object
                nullable: true
                properties:
                  count:
                    type: number
                  min:
                    type: number
                  max:
                    type: number
                  mean:
                    type: number
                  final:
                    type: number
                    description: Final value (at last step)
                required:
                  - count
                  - min
                  - max
                  - mean
                  - final
            required:
              - runId
              - runName
              - url
              - status
              - stats
      required:
        - projectName
        - logName
        - comparisonUrl
        - runs
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key obtained from the mlop dashboard

````