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

# Get conversation metric output(s)

> Retrieve metric output(s) for a conversation by ID. The path segment
accepts two ID types and returns different response shapes:

- **26-char MetricOutput ULID** (e.g. `01JCQR8Z9PQSTNVWXY12345678`):
  returns a single metric output as `{ "metric": {...} }`.
- **22-char Metric definition ID** (e.g. `29BlkepvvX19ebbLDB0y6Q`):
  returns every output for that metric on the conversation as
  `{ "metric_outputs": [...] }`.

Clients should branch on the input ID length they passed.

This endpoint serves **monitoring conversations only**. To retrieve
results for a simulation — including test-metric results from
`POST /v1/metrics/{metric_id}/test` — use
`GET /v1/simulations/{simulation_id}/metrics/{metric_output_id}` instead.




## OpenAPI

````yaml /api-reference/v1/conversations-v1.yaml get /conversations/{conversation_id}/metrics/{metric_output_id}
openapi: 3.0.3
info:
  title: Coval Conversations API
  version: 1.0.0
  description: |

    Submit and manage conversation evaluations.
  contact:
    name: Coval API Support
    email: support@coval.dev
    url: https://docs.coval.ai
  license:
    name: Proprietary
    url: https://coval.dev/terms
servers:
  - url: https://api.coval.dev/v1
    description: Production API
security:
  - ApiKeyAuth: []
tags:
  - name: Conversations
    description: Submit and manage real-world conversation monitoring evaluations
  - name: Audio
    description: Upload audio for evaluation and access conversation audio files
paths:
  /conversations/{conversation_id}/metrics/{metric_output_id}:
    get:
      tags:
        - Conversations
      summary: Get conversation metric output(s)
      description: >
        Retrieve metric output(s) for a conversation by ID. The path segment

        accepts two ID types and returns different response shapes:


        - **26-char MetricOutput ULID** (e.g. `01JCQR8Z9PQSTNVWXY12345678`):
          returns a single metric output as `{ "metric": {...} }`.
        - **22-char Metric definition ID** (e.g. `29BlkepvvX19ebbLDB0y6Q`):
          returns every output for that metric on the conversation as
          `{ "metric_outputs": [...] }`.

        Clients should branch on the input ID length they passed.


        This endpoint serves **monitoring conversations only**. To retrieve

        results for a simulation — including test-metric results from

        `POST /v1/metrics/{metric_id}/test` — use

        `GET /v1/simulations/{simulation_id}/metrics/{metric_output_id}`
        instead.
      operationId: getConversationMetric
      parameters:
        - name: conversation_id
          in: path
          description: Unique conversation identifier
          required: true
          schema:
            type: string
            minLength: 22
            maxLength: 26
          example: gk3jK9mPq2xRt5vW8yZaBc
        - name: metric_output_id
          in: path
          description: >
            Either a 26-char MetricOutput ULID or a 22-char Metric definition
            ID.

            See endpoint description for response shape per ID type.
          required: true
          schema:
            type: string
            minLength: 22
            maxLength: 26
          example: 01JCQR8Z9PQSTNVWXY12345678
      responses:
        '200':
          description: |
            Metric output details. Single object when called with a 26-char
            ULID, collection object when called with a 22-char metric_id.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GetConversationMetricResponse'
                  - $ref: '#/components/schemas/MetricOutputCollection'
              examples:
                singleByUlid:
                  summary: 26-char ULID → single metric output
                  value:
                    metric:
                      metric_output_id: 01JCQR8Z9PQSTNVWXY12345678
                      metric_id: 29BlkepvvX19ebbLDB0y6Q
                      value: 2.35
                      status: COMPLETED
                collectionByMetricId:
                  summary: 22-char metric_id → list of outputs
                  value:
                    metric_outputs:
                      - metric_output_id: 01JCQR8Z9PQSTNVWXY12345678
                        metric_id: 29BlkepvvX19ebbLDB0y6Q
                        value: 2.35
                        status: COMPLETED
                failed:
                  summary: Failed metric
                  value:
                    metric:
                      metric_output_id: 01JCQR9B2CRTUVWXYZ12345678
                      metric_id: fstokU4ev5UmT8sUBexiwV
                      status: FAILED
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    GetConversationMetricResponse:
      type: object
      required:
        - metric
      properties:
        metric:
          allOf:
            - $ref: '#/components/schemas/SimpleMetricOutput'
          description: >-
            Single metric output (returned when {metric_output_id} is a 26-char
            ULID)
    MetricOutputCollection:
      type: object
      required:
        - metric_outputs
      properties:
        metric_outputs:
          type: array
          items:
            $ref: '#/components/schemas/SimpleMetricOutput'
          description: |
            All MetricOutput rows for a given Metric on this conversation.
            Returned when the path {metric_output_id} is a 22-char Metric
            definition ID.
    SimpleMetricOutput:
      type: object
      required:
        - metric_output_id
        - metric_id
        - status
      properties:
        metric_output_id:
          type: string
          description: Unique metric output identifier (26-char ULID)
          minLength: 26
          maxLength: 26
          example: 01JCQR8Z9PQSTNVWXY12345678
        metric_id:
          type: string
          description: Metric definition identifier (22-char ID)
          minLength: 22
          maxLength: 26
          example: 29BlkepvvX19ebbLDB0y6Q
        metric_version_ulid:
          type: string
          nullable: true
          minLength: 26
          maxLength: 26
          description: >-
            ULID of the metric version this output was scored against (null for
            outputs produced before metric versioning landed)
          example: 01JCQR8Z9PQSTNVWXY12345678
        value:
          description: >
            Metric value (can be float, string, or list of strings depending on
            metric type, or null if failed)
          anyOf:
            - type: number
            - type: string
            - type: array
              items:
                type: string
          example: 2.35
        status:
          type: string
          enum:
            - IN QUEUE
            - IN PROGRESS
            - COMPLETED
            - FAILED
          description: Status of metric computation
          example: COMPLETED
        explanation:
          type: string
          nullable: true
          description: >-
            The LLM judge's reasoning for this metric output, as a flat string.
            Null for metrics that produce no explanation (non-judge metrics) or
            when the output is not yet computed. This is a convenience surfacing
            of the reasoning that otherwise lives nested under
            result.llm.answer_explanation (or result.explanation); it is
            populated in both the list and single-output responses so callers do
            not have to request the full result object to read it.
          example: >-
            The agent never confirmed the caller's address before ending the
            call.
        result:
          type: object
          nullable: true
          additionalProperties: true
          description: >-
            Structured metric result. Its keys depend on the metric type — for
            LLM-judge metrics the judge's reasoning is at
            result.llm.answer_explanation and the evaluation prompt at
            result.llm.prompt. Null for metrics that produce no structured
            result.
          example:
            llm:
              answer_explanation: >-
                The agent never confirmed the caller's address before ending the
                call.
              prompt: Did the agent confirm the caller's address?
      description: |
        Simplified metric output for conversations API.
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Error code
              enum:
                - INVALID_ARGUMENT
                - UNAUTHENTICATED
                - NOT_FOUND
                - ALREADY_EXISTS
                - PAYLOAD_TOO_LARGE
                - INTERNAL_ERROR
              example: INVALID_ARGUMENT
            message:
              type: string
              description: Human-readable error message
              example: Missing required input data
            details:
              type: array
              items:
                $ref: '#/components/schemas/ErrorDetail'
              description: Additional error details
              default: []
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
          description: Field that caused the error
          example: transcript
        description:
          type: string
          description: Detailed description of the error
          example: At least one of transcript, audio, or audio_url must be provided
  responses:
    Unauthenticated:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHENTICATED
              message: Invalid or missing API key
              details: []
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            conversationNotFound:
              summary: Conversation not found
              value:
                error:
                  code: NOT_FOUND
                  message: Conversation not found
                  details: []
            simulationAccess:
              summary: Attempted to access simulation
              value:
                error:
                  code: NOT_FOUND
                  message: Conversation not found
                  details: []
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL_ERROR
              message: An internal error occurred while processing the request
              details: []
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: |
        API key for authentication.

````