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

# Generate Evaluator (Deprecated)

> Generate test scenarios from an agent's configuration using AI



## OpenAPI

````yaml post /test_framework/v1/scenarios/generate/
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:
  /test_framework/v1/scenarios/generate/:
    post:
      tags:
        - test_framework
      description: Generate test scenarios from an agent's configuration using AI
      operationId: scenarios-generate-create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SchemaGenerateScenarios'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SchemaGenerateScenarios'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SchemaGenerateScenarios'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: Unique identifier for the scenario
                    name:
                      type: string
                      description: Name of the scenario
                    agent:
                      type: integer
                      description: ID of the AI agent this scenario belongs to
                    assistant_id:
                      type: string
                      description: >-
                        Alternative to agent ID - the assistant ID to use for
                        this scenario
                    personality:
                      type: integer
                      description: ID of the personality used in this scenario
                    personality_name:
                      type: string
                      description: Name of the personality used in this scenario
                    tags:
                      type: array
                      items:
                        type: string
                      description: Tags associated with this scenario.
                    runs:
                      type: array
                      items:
                        type: integer
                      description: List of IDs for the last run of this scenario
                    metrics:
                      type: array
                      items:
                        type: integer
                      description: List of metric IDs to associate with this scenario
                    metric_names:
                      type: array
                      items:
                        type: string
                      description: List of metric names associated with this scenario
                    phone_number:
                      type: string
                      description: Phone number used for outbound calls in this scenario
                    phone_number_queue_length:
                      type: integer
                      description: Number of runs in queue for this phone number
                    first_message:
                      type: string
                      description: First message to be sent in the scenario
                    inbound_phone_number:
                      type: integer
                      description: ID of the phone number used for inbound calls
                    inbound_phone_number_data:
                      type: object
                      description: Details of the phone number used for inbound calls
                      properties:
                        id:
                          type: integer
                          description: ID of the inbound phone number
                        number:
                          type: string
                          description: The actual phone number
                        phone_number_id:
                          type: string
                          description: External ID of the phone number
                    instructions:
                      type: string
                      description: Instructions for the AI agent in this scenario
                    simulation_description:
                      type: string
                      description: >-
                        Description of the simulation if this scenario was
                        created by simulation
                    information_fields:
                      type: object
                      description: Additional information fields for the scenario
                    expected_outcome_prompt:
                      type: string
                      description: Expected outcome prompt for the scenario
                    scenario_language:
                      type: string
                      description: Language of the scenario
                    is_simulating:
                      type: boolean
                      description: Whether this scenario was created by simulation
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  field_name:
                    type: array
                    items:
                      type: string
          description: ''
      deprecated: true
      security:
        - api_key: []
components:
  schemas:
    SchemaGenerateScenarios:
      type: object
      properties:
        agent_id:
          type: integer
          description: ID of the agent to generate evaluator for
        assistant_id:
          type: string
          description: >-
            Alternative to agent_id - the assistant ID to generate evaluators
            for
        personalities:
          type: array
          items:
            type: integer
          description: List of personality IDs to use for generated evaluators
        num_scenarios:
          type: integer
          maximum: 100
          minimum: 1
          description: Number of evaluators to generate (1-100)
        test_profile:
          type: integer
          description: ID of the test profile to assign to generated evaluators
        scenario_type:
          enum:
            - workflow
            - red_teaming_voice
            - red_teaming_text
            - knowledge_base
          type: string
          x-spec-enum-id: 4ef5c62a43e5fdd9
          default: workflow
          description: >-
            Type of scenarios to generate: workflow (standard scenarios),
            red_teaming_voice (red teaming with voice-suitable prompts only),
            red_teaming_text (red teaming with all prompts), or knowledge_base
            (knowledge base scenarios)


            * `workflow` - workflow

            * `red_teaming_voice` - red_teaming_voice

            * `red_teaming_text` - red_teaming_text

            * `knowledge_base` - knowledge_base
        attack_type:
          enum:
            - ''
            - system_prompt_leak
            - data_leak
            - harmful_content
            - biased_output
            - unauthorized_actions
            - off_task
            - null
          type:
            - string
            - 'null'
          x-spec-enum-id: 70525e347169b18e
          description: >-
            Attack category for red teaming scenarios. Required when
            scenario_type is red_teaming_voice or red_teaming_text. Categories:
            system_prompt_leak (attempts to extract the system prompt),
            data_leak (attempts to extract sensitive data), harmful_content
            (attempts to generate harmful output), biased_output (attempts to
            generate biased responses), unauthorized_actions (attempts to
            trigger unauthorized tool calls or actions), off_task (attempts to
            derail the conversation away from the agent's purpose)


            * `` - 

            * `system_prompt_leak` - system_prompt_leak

            * `data_leak` - data_leak

            * `harmful_content` - harmful_content

            * `biased_output` - biased_output

            * `unauthorized_actions` - unauthorized_actions

            * `off_task` - off_task
        expected_outcome:
          type:
            - string
            - 'null'
          description: >-
            Custom expected outcome for the scenario. If not provided, a default
            is generated based on the attack type.
        knowledge_base:
          type: array
          items:
            type: integer
          description: >-
            List of Knowledge Base file IDs for the agent to reference during
            scenario generation
        extra_instructions:
          type: string
          description: Additional instructions to guide evaluator generation
        inbound_phone_number:
          type:
            - integer
            - 'null'
          description: Phone number ID to use for inbound evaluator
        first_message:
          type: string
          default: Hello
          description: Initial message to start the conversation
          maxLength: 1000
        generate_expected_outcomes:
          type: boolean
          default: false
          description: If true, expected outcomes will be generated for each evaluator
        tags:
          type: array
          items:
            type: string
          description: List of tags to apply to all generated scenarios
        tool_ids:
          type: array
          items:
            type: string
          description: List of tool IDs to use for generated evaluators
          example:
            - TOOL_DTMF
            - TOOL_END_CALL
            - TOOL_END_CALL_ONLY_ON_TRANSFER
        folder_path:
          type:
            - string
            - 'null'
          description: >-
            Folder path to assign generated scenarios to (e.g., 'folder_name' or
            'parent.child')
      required:
        - num_scenarios
  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.

````