Freeplay Test Runs API

Create, list, and retrieve batch test runs.

OpenAPI Specification

freeplay-test-runs-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Freeplay HTTP Agents Test Runs API
  description: The Freeplay HTTP API provides programmatic access to the Freeplay LLM experimentation, evaluation, and observability platform. It covers prompt template management, recording completions and sessions/traces, curating test cases and datasets, running batch test runs and evaluations, and recording customer and human feedback. The API root is your Freeplay instance URL plus /api/v2. For the standard cloud instance this is https://app.freeplay.ai/api/v2; private/self-hosted instances use a per-account subdomain such as https://{subdomain}.freeplay.ai/api/v2.
  termsOfService: https://freeplay.ai/terms
  contact:
    name: Freeplay Support
    url: https://docs.freeplay.ai/
  version: v2
servers:
- url: https://app.freeplay.ai/api/v2
  description: Freeplay Cloud (standard instance)
- url: https://{subdomain}.freeplay.ai/api/v2
  description: Private / self-hosted instance (per-account subdomain)
  variables:
    subdomain:
      default: app
      description: Your Freeplay account subdomain.
security:
- bearerAuth: []
tags:
- name: Test Runs
  description: Create, list, and retrieve batch test runs.
paths:
  /projects/{project_id}/test-runs:
    parameters:
    - $ref: '#/components/parameters/ProjectId'
    get:
      operationId: listTestRuns
      tags:
      - Test Runs
      summary: List test runs for a project.
      responses:
        '200':
          description: A list of test runs.
          content:
            application/json:
              schema:
                type: object
                properties:
                  test_runs:
                    type: array
                    items:
                      $ref: '#/components/schemas/TestRun'
    post:
      operationId: createTestRun
      tags:
      - Test Runs
      summary: Create a test run from a dataset.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTestRunRequest'
      responses:
        '200':
          description: The created test run.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestRun'
  /projects/{project_id}/test-runs/id/{test_run_id}:
    parameters:
    - $ref: '#/components/parameters/ProjectId'
    - name: test_run_id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    get:
      operationId: getTestRun
      tags:
      - Test Runs
      summary: Retrieve test run results by ID.
      responses:
        '200':
          description: The test run and its results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestRun'
components:
  schemas:
    CreateTestRunRequest:
      type: object
      required:
      - dataset_id
      properties:
        dataset_id:
          type: string
          format: uuid
        name:
          type: string
        prompt_template_version_id:
          type: string
          format: uuid
        flavor_name:
          type: string
        include_outputs:
          type: boolean
    TestRun:
      type: object
      properties:
        test_run_id:
          type: string
          format: uuid
        name:
          type: string
        dataset_id:
          type: string
          format: uuid
        status:
          type: string
        results:
          type: array
          items:
            type: object
            additionalProperties: true
  parameters:
    ProjectId:
      name: project_id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: The Freeplay project ID.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Authenticate requests using your Freeplay API key as a Bearer token in the Authorization header. API keys are managed at https://app.freeplay.ai/settings/api-access.