Source: https://docs.cumuluslabs.io/reference/comparisons.get
Content version: 31df45f9

# comparisons.get

Get one comparison with its per-case verdicts

## Request {#request}

`GET /api/v1/comparisons/{comparison_id}`

- MCP: `comparisons_get`
- SDK: `client.comparisons.get` (SDK path arguments use `path`; MCP uses `params`).
- Minimum API key role: **viewer**.
- Idempotency: **none**.

Use the request schema below. Read IDs from earlier operation results.

## Input schema {#input-schema}

```json
{
  "parameters": [
    {
      "name": "comparison_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    }
  ],
  "requestBody": null
}
```

## Responses {#responses}

```json
{
  "200": {
    "description": "Get one comparison with its per-case verdicts",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ComparisonsGetResponse200"
        }
      }
    }
  },
  "4XX": {
    "description": "Typed error (ApiError)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  },
  "5XX": {
    "description": "Typed error (ApiError)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  }
}
```

## Referenced schemas {#schemas}

```json
{
  "components": {
    "schemas": {
      "ComparisonsGetResponse200": {
        "type": "object",
        "properties": {
          "comparison": {
            "$ref": "#/components/schemas/Comparison"
          },
          "cases": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ordinal": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 199
                },
                "source_run_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "baseline_run_id": {
                  "allOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    }
                  ],
                  "nullable": true
                },
                "candidate_run_id": {
                  "allOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    }
                  ],
                  "nullable": true
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "running",
                    "judging",
                    "settled",
                    "failed",
                    "uncertain"
                  ]
                },
                "verdict": {
                  "type": "string",
                  "enum": [
                    "candidate",
                    "baseline",
                    "tie"
                  ],
                  "nullable": true
                },
                "baseline_score": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1,
                  "nullable": true
                },
                "candidate_score": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1,
                  "nullable": true
                },
                "judge_measurement_id": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "error_code": {
                  "type": "string",
                  "maxLength": 128,
                  "nullable": true
                },
                "content_state": {
                  "type": "string",
                  "enum": [
                    "retained",
                    "expired"
                  ]
                }
              },
              "required": [
                "ordinal",
                "source_run_id",
                "baseline_run_id",
                "candidate_run_id",
                "state",
                "verdict",
                "baseline_score",
                "candidate_score",
                "judge_measurement_id",
                "error_code",
                "content_state"
              ],
              "additionalProperties": false
            },
            "maxItems": 200
          }
        },
        "required": [
          "comparison",
          "cases"
        ],
        "additionalProperties": false
      },
      "Comparison": {
        "type": "object",
        "properties": {
          "owner_id": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "minLength": 1
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "comparison_id": {
            "type": "string",
            "format": "uuid"
          },
          "agent_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
          },
          "baseline": {
            "$ref": "#/components/schemas/PublicationRef"
          },
          "candidate": {
            "$ref": "#/components/schemas/PublicationRef"
          },
          "case_run_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1,
            "maxItems": 200
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "uncertain"
            ]
          },
          "summary": {
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "cases": {
                    "type": "integer"
                  },
                  "candidate_wins": {
                    "type": "integer"
                  },
                  "baseline_wins": {
                    "type": "integer"
                  },
                  "ties": {
                    "type": "integer"
                  },
                  "unscored": {
                    "type": "integer"
                  }
                },
                "required": [
                  "cases",
                  "candidate_wins",
                  "baseline_wins",
                  "ties",
                  "unscored"
                ],
                "additionalProperties": false
              }
            ],
            "nullable": true
          },
          "rubric": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "version": {
                "type": "integer",
                "exclusiveMinimum": true,
                "minimum": 0
              }
            },
            "required": [
              "id",
              "version"
            ],
            "additionalProperties": false
          },
          "judge_model": {
            "$ref": "#/components/schemas/ModelIdentity"
          },
          "error_code": {
            "type": "string",
            "maxLength": 128,
            "nullable": true
          },
          "finished_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_by": {
            "$ref": "#/components/schemas/PrincipalRef"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "owner_id",
          "environment",
          "tenant_id",
          "comparison_id",
          "agent_id",
          "baseline",
          "candidate",
          "case_run_ids",
          "state",
          "summary",
          "rubric",
          "judge_model",
          "error_code",
          "finished_at",
          "created_by",
          "created_at"
        ],
        "additionalProperties": false
      },
      "PublicationRef": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
          },
          "version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647
          },
          "digest": {
            "type": "string",
            "pattern": "^sha256:[a-f0-9]{64}$"
          }
        },
        "required": [
          "agent_id",
          "version",
          "digest"
        ],
        "additionalProperties": false
      },
      "ModelIdentity": {
        "type": "object",
        "properties": {
          "model_id": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          },
          "provider": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          },
          "tier": {
            "type": "string",
            "enum": [
              "frontier",
              "cumulus-served",
              "customer-gpu"
            ]
          }
        },
        "required": [
          "model_id",
          "provider",
          "tier"
        ],
        "additionalProperties": false
      },
      "PrincipalRef": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "owner_id": {
                "type": "string",
                "minLength": 1
              },
              "environment": {
                "type": "string",
                "minLength": 1
              },
              "kind": {
                "type": "string",
                "enum": [
                  "user"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "owner_id",
              "environment",
              "kind",
              "id"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "owner_id": {
                "type": "string",
                "minLength": 1
              },
              "environment": {
                "type": "string",
                "minLength": 1
              },
              "kind": {
                "type": "string",
                "enum": [
                  "api_key"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "owner_id",
              "environment",
              "kind",
              "id"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "owner_id": {
                "type": "string",
                "minLength": 1
              },
              "environment": {
                "type": "string",
                "minLength": 1
              },
              "kind": {
                "type": "string",
                "enum": [
                  "system"
                ]
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              }
            },
            "required": [
              "owner_id",
              "environment",
              "kind",
              "id"
            ],
            "additionalProperties": false
          }
        ]
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "unauthenticated",
                  "forbidden",
                  "not_found",
                  "conflict",
                  "invalid_request",
                  "idempotency_conflict",
                  "policy_denied",
                  "capability_unavailable",
                  "provider_unavailable",
                  "knowledge_unavailable",
                  "publication_invalid",
                  "run_not_active",
                  "rate_limited",
                  "outcome_unknown",
                  "internal"
                ]
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "none",
                  "unknown"
                ]
              },
              "details": {
                "type": "object",
                "additionalProperties": {}
              }
            },
            "required": [
              "code",
              "message",
              "retryable",
              "outcome"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

## Errors and recovery {#errors}

See [API error handling](https://docs.cumuluslabs.io/api#errors) and [Troubleshooting](https://docs.cumuluslabs.io/troubleshooting).

## Related guides {#related-guides}

- [Using the API](https://docs.cumuluslabs.io/api)
