openapi: 3.0.1 info: title: Freeplay HTTP Agents Datasets 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: Datasets description: Curate datasets and their test cases. paths: /projects/{project_id}/datasets/name/{dataset_name}: parameters: - $ref: '#/components/parameters/ProjectId' - name: dataset_name in: path required: true schema: type: string get: operationId: getDatasetByName tags: - Datasets summary: Retrieve dataset metadata by name. responses: '200': description: Dataset metadata. content: application/json: schema: $ref: '#/components/schemas/Dataset' /projects/{project_id}/datasets/id/{dataset_id}: parameters: - $ref: '#/components/parameters/ProjectId' - $ref: '#/components/parameters/DatasetId' get: operationId: getDatasetById tags: - Datasets summary: Retrieve dataset metadata by ID. responses: '200': description: Dataset metadata. content: application/json: schema: $ref: '#/components/schemas/Dataset' /projects/{project_id}/datasets/name/{dataset_name}/test-cases: parameters: - $ref: '#/components/parameters/ProjectId' - name: dataset_name in: path required: true schema: type: string get: operationId: getTestCasesByDatasetName tags: - Datasets summary: Retrieve test cases for a dataset by name. responses: '200': description: A list of test cases. content: application/json: schema: type: object properties: test_cases: type: array items: $ref: '#/components/schemas/TestCase' /projects/{project_id}/datasets/id/{dataset_id}/test-cases: parameters: - $ref: '#/components/parameters/ProjectId' - $ref: '#/components/parameters/DatasetId' get: operationId: getTestCasesByDatasetId tags: - Datasets summary: Retrieve test cases for a dataset by ID. responses: '200': description: A list of test cases. content: application/json: schema: type: object properties: test_cases: type: array items: $ref: '#/components/schemas/TestCase' post: operationId: uploadTestCases tags: - Datasets summary: Upload test cases to a dataset. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UploadTestCasesRequest' responses: '200': description: The uploaded test cases. content: application/json: schema: type: object properties: test_cases: type: array items: $ref: '#/components/schemas/TestCase' components: schemas: TestCase: type: object properties: test_case_id: type: string format: uuid values: type: object additionalProperties: true description: Input variable values for the test case. output: type: string description: Expected or reference output. history: type: array items: $ref: '#/components/schemas/Message' metadata: type: object additionalProperties: true UploadTestCasesRequest: type: object required: - test_cases properties: test_cases: type: array items: $ref: '#/components/schemas/TestCase' Dataset: type: object properties: dataset_id: type: string format: uuid name: type: string description: type: string test_case_count: type: integer Message: type: object properties: role: type: string enum: - system - user - assistant - tool content: type: string parameters: DatasetId: name: dataset_id in: path required: true schema: type: string format: uuid 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.