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

# Run Evaluator LiveKit (v2)

> Execute evaluators against a LiveKit agent using project-level credentials. Cekura creates the rooms — no per-scenario URLs needed. Requires LiveKit credentials configured on the agent or project.



## OpenAPI

````yaml post /test_framework/v1/scenarios/run_scenarios_livekit_v2/
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/run_scenarios_livekit_v2/:
    post:
      tags:
        - Evaluators
      summary: Run evaluators against a LiveKit agent (project credentials, v2)
      description: >-
        LIVEKIT VOICE RUN (project credentials, v2): Execute evaluators against
        a LiveKit agent using credentials configured at the project (or agent)
        level. Cekura creates the rooms; you don't pass URLs per-scenario.
        Requires `livekit_api_key`, `livekit_data.api_secret`, and
        `livekit_data.url` on the agent or project.


        **Cost:** voice-simulation rate per run.

        **Run-count math:** total runs = `len(scenarios) × frequency`.


        **Per-request `room_config` override** is allowed; merges over agent
        defaults.


        **When to use this vs others** (pick the endpoint matching the agent's
        configured connection — check `aiagents_retrieve`):

        - `scenarios_run_voice` — phone / SIP voice run

        - `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)

        - `scenarios_run_websocket` — JSON/text WebSocket runs
      operationId: scenarios-run-livekit-v2_2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunLivekitScenarios'
            examples:
              LiveKitV2Run:
                value:
                  scenarios:
                    - scenario: 101
                    - scenario: 102
                  frequency: 1
                summary: LiveKit v2 run
              LiveKitV2RunWithOverrides:
                value:
                  scenarios:
                    - scenario: 101
                  frequency: 1
                  livekit_data:
                    agent_name: my-dispatch-agent
                    config:
                      empty_timeout: 300
                      max_participants: 2
                summary: LiveKit v2 run with overrides
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/RunLivekitScenarios'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/RunLivekitScenarios'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    description: ID of the result
                  agent:
                    type: integer
                    description: ID of the agent
                  status:
                    type: string
                    enum:
                      - pending
                      - running
                      - completed
                      - failed
                    description: Status of the result
                  run_as_text:
                    type: boolean
                    description: Whether the scenario ran as text or not
                    example: false
                  runs:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: ID of the run
                        status:
                          type: string
                          enum:
                            - pending
                            - running
                            - completed
                            - failed
                          description: Status of the run
                        scenario:
                          type: integer
                          description: ID of the scenario
                        number:
                          type: string
                          description: >-
                            For outbound runs (agent.inbound=False). The given
                            number that must be called from the phone number
                            configured in the cekura agent.
                          example: '+11234567890'
                        inbound_number:
                          type:
                            - string
                            - 'null'
                          description: >-
                            For inbound runs (agent.inbound=True). The agent's
                            configured phone number will receive calls from this
                            number.
                          example: '+11234567890'
                        scenario_name:
                          type: string
                          description: Name of the scenario
                        test_profile_data:
                          type:
                            - object
                            - 'null'
                          description: >-
                            Details of the test profile associated with this run
                            scenario
                        outbound_dial_window_opens_at:
                          type:
                            - string
                            - 'null'
                          format: date-time
                          description: >-
                            When the outbound dial window opened (run
                            transitioned to pending/waiting-for-call). Null
                            until dispatched.
                        outbound_dial_window_seconds:
                          type:
                            - integer
                            - 'null'
                          description: Duration of the outbound dial window in seconds.
                        outbound_dial_window_closes_at:
                          type:
                            - string
                            - 'null'
                          format: date-time
                          description: >-
                            Deadline by which your agent must dial the outbound
                            number (opens_at + outbound_dial_window_seconds).
                            Dials after this are dropped and the run returns
                            status: timeout.
                    examples:
                      - id: 274
                        status: pending
                        scenario: 1
                        number: null
                        inbound_number: '+11234567890'
                        scenario_name: Customer Support Call (Agent Inbound = True)
                        test_profile_data: null
                        outbound_dial_window_opens_at: null
                        outbound_dial_window_seconds: null
                        outbound_dial_window_closes_at: null
                      - id: 275
                        status: pending
                        scenario: 2
                        number: '+11234567890'
                        inbound_number: null
                        scenario_name: Outbound Sales Call (Agent Inbound = False)
                        test_profile_data: null
                        outbound_dial_window_opens_at: '2026-06-24T10:47:30Z'
                        outbound_dial_window_seconds: 300
                        outbound_dial_window_closes_at: '2026-06-24T10:52:30Z'
                  created_at:
                    type: string
                    format: date-time
                    example: '2025-02-25T21:00:01.990052Z'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  field_name:
                    type: array
                    items:
                      type: string
          description: ''
      security:
        - api_key: []
components:
  schemas:
    RunLivekitScenarios:
      type: object
      description: ''
      properties:
        name:
          type:
            - string
            - 'null'
          description: Optional name for the scenario result
        frequency:
          type: integer
          maximum: 100
          minimum: 1
          default: 1
          description: Frequency to run
        scenarios:
          type: array
          items:
            $ref: '#/components/schemas/LivekitScenario'
        agent:
          type:
            - integer
            - 'null'
          description: Agent to use. Required if none of the scenarios have an agent.
        personality_ids:
          type:
            - array
            - 'null'
          items:
            type: integer
          description: >-
            List of personality IDs to override for this run. If not provided,
            uses the scenario's default personality.
        test_profile_ids:
          type:
            - array
            - 'null'
          items:
            type: integer
          description: >-
            List of test profile IDs to override for this run. If not provided,
            uses the scenario's default test profile.
        mock_tool_names:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            Names of mock tools to activate for this run. Omit (or send null) to
            mock every tool configured on the agent; send an empty list to mock
            none so every tool keeps its original endpoint; send specific names
            to mock only those. Tools that belong to an MCP server should be
            selected via the MCP server's name or key, which mocks all of that
            server's tools as one unit. Legacy MCP sub-tool names are accepted
            as aliases for the whole parent MCP.
        livekit_data:
          allOf:
            - $ref: '#/components/schemas/LivekitRunDataOverride'
          description: >-
            Per-run LiveKit overrides (config, agent_name, url). Credentials are
            always read from the agent/project.
        concurrency_limit:
          type:
            - integer
            - 'null'
          description: Optional cap on how many of this run's calls execute concurrently.
        personality_id:
          type:
            - integer
            - 'null'
          description: >-
            Single personality ID override. Merged into personality_ids; prefer
            personality_ids for multiple.
        test_profile_id:
          type:
            - integer
            - 'null'
          description: >-
            Single test profile ID override. Merged into test_profile_ids;
            prefer test_profile_ids for multiple.
      required:
        - scenarios
    LivekitScenario:
      type: object
      description: ''
      properties:
        scenario:
          type: integer
        publish_data_message: {}
      required:
        - scenario
    LivekitRunDataOverride:
      type: object
      description: >-
        Per-run LiveKit overrides. Credentials (api_key/api_secret) are never
        taken here — they are read from the agent/project ProviderCredential.
      properties:
        config:
          description: >-
            Room configuration to use for this run (e.g. empty_timeout,
            max_participants). Fully replaces the agent/project saved config —
            no merge.
        agent_name:
          type:
            - string
            - 'null'
          description: >-
            LiveKit agent name for explicit dispatch. Overrides the
            agent/project saved agent_name.
        url:
          type:
            - string
            - 'null'
          description: >-
            LiveKit server URL override. Falls back to the agent/project saved
            url when omitted.
  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.

````