---
title: "Create a test set from a production call log"
method: POST
path: "/test_framework/test-sets/create_from_call_log/"
tags: ["test_framework"]
---

# Create a test set from a production call log

`POST /test_framework/test-sets/create_from_call_log/`

## Request

- Base URL: `https://api.cekura.ai`
- URL: `https://api.cekura.ai/test_framework/test-sets/create_from_call_log/`
- Auth: one of:
  - API key in header `X-CEKURA-API-KEY`
  - HTTP bearer
  - HTTP bearer

Promote a real production call into a labeled test set by attaching the specified metrics. The call's transcript, recording, and any existing metric evaluations are copied into the new test set so they can be reviewed and used as labeled ground truth. Returns the created or existing test set.

## Request body

- SchemaPostCreateFromCallLogRequest
  - `call_log_id` integer, required: ID of the call log to create test set from
  - `project` integer: ID of the project that owns the call log
  - `name` string: Optional name for the test set. If not provided, call log ID will be used
  - `metrics` MetricWithFeedback[], required: List of metrics with optional notes to include in the test set
    - `metric` integer, required: ID of the metric
    - `feedback` string: Optional note/feedback for the metric
    - `expected_value` unknown

## Response `200`

- TestSetDetail
  - `id` integer
  - `agent` integer, required
  - `name` string: Name of the test set Example: `"Test Set 1"`
  - `transcript` string: 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` unknown
  - `voice_recording` string, uri, required
  - `voice_recording_url` string: Audio URL
  - `call_end_reason` string: Reason why the call ended. Example: - `"customer-ended-call"` - `"agent-ended-call"`
  - `duration` string: Call duration in minutes in MM:SS format. Example: `01:10`
  - `source_model` 'CallLog' | 'Run': * `CallLog` - Call Log * `Run` - Run
  - `source_id` string
  - `metric_reviews` MetricReviewInline[]
    - `id` integer, required
    - `metric` integer
    - `metric_name` string
    - `metric_enum_values` unknown
    - `eval_type` string
    - `expected_value` unknown
    - `explanation` unknown
    - `feedback` string: Metric feedback Example: - `"Great Call"`
    - `metric_function_name` string
    - `metric_vocera_defined_metric_code` string
  - `created_at` string, date-time: When this record was created. Example: `2024-03-15T10:30:45Z`
  - `updated_at` string, date-time: When this record was last updated. Example: `2024-03-15T10:35:11Z`

## Changes

- **2026-11-03** `a6fb6a739212`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cekura/apis/cekura-api/changes/test_framework/test-sets/create_from_call_log/post.md)

---

[API](https://skmtc.dev/cekura/apis/cekura-api.md) - [All operations](https://skmtc.dev/cekura/apis/cekura-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cekura/apis/cekura-api/revisions/a6fb6a739212?raw)
