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

# Evaluate Metrics

> Evaluate metrics against call log transcripts



## OpenAPI

````yaml post /observability/v1/call-logs/evaluate_metrics/
openapi: 3.1.0
info:
  title: Cekura API
  version: v1
  description: >-
    Complete API documentation for the Cekura platform. This API provides
    endpoints for testing, observing, and evaluating AI voice agents — including
    managing agents, running evaluators, defining metrics, and analyzing call
    quality.
servers:
  - url: https://api.cekura.ai
security: []
paths:
  /observability/v1/call-logs/evaluate_metrics/:
    post:
      tags:
        - observability
      summary: Run specific metrics against call logs
      description: >-
        Evaluate one or more metrics against selected call logs. Unlike
        `rerun_evaluation` (which re-runs all assigned metrics), this endpoint
        lets you target specific metrics.


        **Scope:** provide either `agent_id` or `project_id` to identify which
        agent's call logs and metrics to use. Metrics must belong to the
        specified agent or project.


        **Credit check:** cost scales with the number of call logs and metrics
        selected. The request is rejected if your balance is insufficient —
        check your balance first via `test_framework_billing_info_retrieve`.


        **Async:** evaluation runs in the background. The response returns the
        call logs in their current state. Retrieve each call log individually to
        see updated metric results once evaluation completes.


        **Rate limited.** Respect 429 responses — wait for the `Retry-After`
        duration.
      operationId: call-logs-evaluate-metrics-create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EvaluateMetrics'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/EvaluateMetrics'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/EvaluateMetrics'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CallLogList'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  field_name:
                    type: array
                    items:
                      type: string
          description: ''
      security:
        - api_key: []
components:
  schemas:
    EvaluateMetrics:
      type: object
      properties:
        agent_id:
          type: integer
          description: 'Cekura agent ID. Provide this or `project_id`. Example: `224`'
        project_id:
          type: integer
          description: 'Project ID. Provide this or `agent_id`. Example: `456`'
        call_logs:
          type: array
          items:
            type: integer
          description: 'IDs of the call logs to evaluate. Example: `[123, 456]`'
        metrics:
          type: array
          items:
            type: integer
          description: >-
            IDs of the metrics to run. Must belong to the agent/project.
            Example: `[789, 790]`
      required:
        - call_logs
        - metrics
    CallLogList:
      type: object
      description: ''
      properties:
        id:
          type: integer
          readOnly: true
        duration:
          type: string
          readOnly: true
          description: |-
            Call duration in minutes in MM:SS format.
            Example: `01:10`
        success:
          type:
            - boolean
            - 'null'
          description: |-
            Whether the call was successful.
            Example: `true` or `false`
        is_reviewed:
          type: boolean
          description: |-
            Whether the call has been reviewed.
            Example: `true` or `false`
        status:
          enum:
            - success
            - failure
            - reviewed_success
            - reviewed_failure
          type: string
          x-spec-enum-id: a5dfbbcee6f2a6ce
          description: |-
            Status of the call or conversation.
            Example: `"completed"` or `"failed"`

            * `success` - Success
            * `failure` - Failure
            * `reviewed_success` - Reviewed Success
            * `reviewed_failure` - Reviewed Failure
        feedback:
          type: string
          description: |-
            Feedback about the call.
            Example: `"Great Call"`
        metrics:
          type: array
          items:
            $ref: '#/components/schemas/CallLogListSerializerMetrics'
          readOnly: true
          description: Metrics of the call
        call_ended_reason:
          type: string
          description: |
            Reason why the call ended.
            Example: 
            - `"customer-ended-call"`
            - `"agent-ended-call"`
          maxLength: 100
        customer_number:
          type: string
          description: |
            Customer's phone number or identifier.
            Example: 
            - `"+1234567890"`
            - `"customer_abc123"`
          maxLength: 100
        agent:
          type:
            - integer
            - 'null'
          description: Agent ID
        agent_name:
          type: string
          readOnly: true
          description: Agent name
        call_id:
          type: string
          description: |-
            Unique identifier for the call.
            Example: 
            - `"call_abc123xyz"`
            - `"stereo_audio_session_456"`
          maxLength: 100
        trace_id:
          type: string
          description: >-
            OpenTelemetry trace ID (32-char hex). Set when OTel tracing is
            enabled.
          maxLength: 32
        timestamp:
          type: string
          format: date-time
          description: |-
            When the call occurred.
            Example: `2024-03-15T10:15:45Z`
        error_message:
          type:
            - string
            - 'null'
        dropoff_point:
          type: string
          description: |-
            Point in conversation where user disengaged.
            Example: `"end of conversation as no queries remaining"`
          maxLength: 1000
        topic:
          type: string
          description: |
            Topic of the call.
            Example: 
            - `"product_inquiry"`
            - `"technical_support"`
          maxLength: 1000
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: |-
            When this record was created.
            Example: `2024-03-15T10:30:45Z`
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: |-
            When this record was last updated.
            Example: `2024-03-15T10:35:11Z`
        transcript:
          type: string
          description: >
            Full text transcript of the call.

            Example: 

            ```text

            [00:01] Testing Agent: Hello. 

            [00:02] Main Agent: Hello, how can I help you today?

            [00:03] Testing Agent: Well, I mean, sure. What time exactly are we
            talking about here

            [00:04] Main Agent: 6 PM.

            [00:05] Testing Agent: Great. I'll book that for you. Just a sec.

            [00:06] Main Agent: Okay.

            ```
        transcript_object:
          type: string
          readOnly: true
          description: |-
            Structured transcript data with timestamps.
            Example: 
            ```json
            [
                {
                    "role": "Testing Agent",
                    "content": "Hello",
                    "start_time": 1.2,
                    "end_time": 1.8
                },
                {
                    "role": "Main Agent",
                    "content": "Hello, how can I help you today?",
                    "start_time": 1.8,
                    "end_time": 2.5
                }
            ]`
        evaluation:
          type: string
          readOnly: true
          description: Evaluation of the call
      required:
        - call_id
    CallLogListSerializerMetrics:
      type: object
      properties:
        id:
          type: integer
          description: Metric ID
        name:
          type: string
          description: Metric name
        type:
          type: string
          description: Metric type
        score:
          type: number
          format: double
          description: Evaluated metric score, Present if metrictype is not enum
        enum:
          type: string
          description: Metric enum, Present if type is enum
        value:
          type: string
          description: Evaluated metric value, Present if metric type is enum
      required:
        - enum
        - id
        - name
        - score
        - type
        - value
  securitySchemes:
    api_key:
      type: apiKey
      name: X-CEKURA-API-KEY
      in: header
      description: >-
        API Key Authentication. It should be included in the header of each
        request.

````