> ## 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.

# Create Evaluators from Call Logs

> Create scenarios from call logs in background using Celery tasks.



## OpenAPI

````yaml post /observability/v1/call-logs/create_scenarios/
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/create_scenarios/:
    post:
      tags:
        - observability
      description: >-
        Generate test scenarios from real production call logs.


        Returns a `progress_id` immediately — the actual scenario creation runs
        in the background.

        Poll `GET
        /observability/v1/call-logs/create_scenarios_progress?progress_id=<id>`
        until

        `completed_scenarios + failed_scenarios >= total_scenarios`. The
        `scenarios_list` field

        (full Scenario objects) is populated only once processing is complete.


        **`call_logs` accepts:** a list of IDs `[1, 2, 3]` or `"all"` for every
        call log on the agent.


        **`copy_to_agent`:** optionally copy the generated scenarios to a
        different agent —

        useful when your observation agent and your test agent are separate.


        **Prerequisite:** call logs must have a transcript (uploaded via
        `transcript_json`).

        Audio-only logs without a transcript cannot produce scenarios.
      operationId: call-logs-create-scenarios_2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SchemaPostCreateScenarios'
            examples:
              Create-scenarios-with-agent-id:
                value:
                  agent_id: 2142
                  call_logs:
                    - 1
                    - 2
                    - 3
                  copy_to_agent: null
                summary: create-scenarios-with-agent-id
              Create-scenarios-with-assistant-id:
                value:
                  assistant_id: asst_1234567890
                  call_logs: all
                summary: create-scenarios-with-assistant-id
              Create-scenarios-with-copy-to-agent:
                value:
                  agent_id: 2142
                  call_logs:
                    - 1
                    - 2
                    - 3
                  copy_to_agent: 2143
                summary: create-scenarios-with-copy-to-agent
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SchemaPostCreateScenarios'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SchemaPostCreateScenarios'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  progress_id:
                    type: string
                    format: uuid
                    description: >-
                      Unique identifier for tracking the progress of scenario
                      creation
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  field_name:
                    type: array
                    items:
                      type: string
          description: ''
        '403':
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
          description: ''
      security:
        - api_key: []
components:
  schemas:
    SchemaPostCreateScenarios:
      type: object
      properties:
        agent_id:
          type: integer
          description: |

            Agent ID, required if assistant_id is not provided
            Example: `2142`
        assistant_id:
          type: string
          description: |

            Assistant ID, required if agent_id is not provided
            Example: `asst_1234567890`
        call_logs:
          type: array
          items:
            type: integer
          description: >

            List of call log IDs to create scenarios from. Can also be the
            string "all" to process all call logs.

            Example: `[1, 2, 3]` or `"all"`
        copy_to_agent:
          type:
            - integer
            - 'null'
          description: |

            Optional agent ID to copy created scenarios to
            Example: `2142`
        project_id:
          type: integer
          description: |

            Project ID. Required when using folder_path.
            Example: `1376`
        folder_path:
          type:
            - string
            - 'null'
          description: |

            Folder path to assign the created scenarios to.
            Example: `"Sales.Inbound"`
  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.

````