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

# Retrieve a test run result

> Returns the specified test run batch, optionally with per-run detail.



## OpenAPI

````yaml /openapi/source/external/inference/inference-ai-tests.json get /ai/tests/test_framework/v1/results/{id}
openapi: 3.1.0
info:
  version: 2.0.0
  title: Telnyx API
  x-latency-category: responsive
  x-endpoint-cost: light
  description: SIP trunking, SMS, MMS, Call Control and Telephony Data Services.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
    description: Version 2.0.0 of the Telnyx API
security:
  - bearerAuth: []
tags:
  - name: AI Tests
    description: >-
      Test agents, evaluator scenarios, metrics, and run results for the AI test
      framework.
paths:
  /ai/tests/test_framework/v1/results/{id}:
    get:
      tags:
        - AI Tests
      summary: Retrieve a test run result
      description: Returns the specified test run batch, optionally with per-run detail.
      operationId: retrieve_test_run_result
      parameters:
        - name: id
          in: path
          required: true
          description: Numeric ID of the test run batch.
          schema:
            type: integer
      responses:
        '200':
          description: Test run batch detail.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestRunResult'
              example:
                id: 10119
                name: Refund escalation flow - run
                agent: 1259
                agent_name: Support Bot Under Test
                agent_inbound: false
                status: completed
                success_rate: 0.8
                run_as_text: false
                is_cronjob: false
                runs: null
                met_expected_outcome_count: 4
                total_expected_outcome_count: 5
                total_runs_count: 5
                completed_runs_count: 5
                success_runs_count: 4
                failed_runs_count: 1
                scenarios:
                  - id: 9512
                    name: Refund escalation flow
                run_type: scheduled
                created_at: '2026-10-13T18:04:05.123456Z'
                updated_at: '2026-10-13T18:34:05.123456Z'
        '400':
          description: Bad Request. The AI Tests service rejected the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiTestsErrorResponse'
              example:
                errors:
                  - code: '10015'
                    title: Bad Request
                    detail: The AI Tests service rejected the request.
        '401':
          description: Unauthorized. Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiTestsErrorResponse'
              example:
                errors:
                  - code: '10003'
                    title: Unauthorized
                    detail: The API key is missing or invalid.
        '404':
          description: >-
            Not Found. The requested resource does not exist or is not enabled
            for your account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiTestsErrorResponse'
              example:
                errors:
                  - code: '10005'
                    title: Not Found
                    detail: The requested resource or URL could not be found.
        '422':
          description: Unprocessable Entity. A validation error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiTestsErrorResponse'
              example:
                errors:
                  - code: '10018'
                    title: Unprocessable Entity
                    detail: Validation failed for the request payload.
        '429':
          description: Too Many Requests. The AI Tests service rate-limited the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiTestsErrorResponse'
              example:
                errors:
                  - code: '10029'
                    title: Too Many Requests
                    detail: Too many requests; retry later.
        '503':
          description: Service Unavailable. The AI Tests service is unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiTestsErrorResponse'
              example:
                errors:
                  - code: '10063'
                    title: Service Unavailable
                    detail: The test framework service is temporarily unavailable.
components:
  schemas:
    TestRunResult:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        agent:
          type: integer
        agent_name:
          type: string
        agent_inbound:
          type: boolean
        status:
          type: string
          description: >-
            Run batch status: running, completed, failed, pending, in_progress,
            evaluating, in_queue, timeout, cancelled, or scaling_up.
        success_rate:
          type:
            - number
            - string
          description: Share of runs judged successful.
        run_as_text:
          type: boolean
          description: Whether the batch ran as text chat rather than voice calls.
        is_cronjob:
          type: boolean
          description: Whether this batch was started by a scheduled job.
        runs:
          type:
            - object
            - 'null'
          description: Per-run detail keyed by run ID.
          additionalProperties:
            type: object
            properties:
              id:
                type: integer
              scenario:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  personality_name:
                    type: string
                  expected_outcome_prompt:
                    type: string
              scenario_name:
                type: string
              personality_name:
                type: string
              success:
                type:
                  - boolean
                  - 'null'
              status:
                type: string
              evaluation_status:
                type: string
              error_message:
                type: string
              test_profile_name:
                type: string
              duration:
                type: string
              timestamp:
                type: string
              executed_at:
                type: string
        met_expected_outcome_count:
          type:
            - integer
            - string
        total_expected_outcome_count:
          type:
            - integer
            - string
        total_runs_count:
          type:
            - integer
            - string
        completed_runs_count:
          type:
            - integer
            - string
        success_runs_count:
          type:
            - integer
            - string
        failed_runs_count:
          type:
            - integer
            - string
        scenarios:
          type:
            - array
            - 'null'
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
        run_type:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - name
        - agent
        - status
        - created_at
        - updated_at
      example:
        id: 10119
        name: Refund escalation flow - run
        agent: 1259
        agent_name: Support Bot Under Test
        agent_inbound: false
        status: completed
        success_rate: 0.8
        run_as_text: false
        is_cronjob: false
        runs: null
        met_expected_outcome_count: 4
        total_expected_outcome_count: 5
        total_runs_count: 5
        completed_runs_count: 5
        success_runs_count: 4
        failed_runs_count: 1
        scenarios:
          - id: 9512
            name: Refund escalation flow
        run_type: scheduled
        created_at: '2026-10-13T18:04:05.123456Z'
        updated_at: '2026-10-13T18:34:05.123456Z'
    AiTestsErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Telnyx error code.
              title:
                type: string
              detail:
                type: string
              source:
                type: object
                properties:
                  pointer:
                    type: string
            required:
              - code
              - title
      required:
        - errors
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````