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

# Bulk Create Agent Test Cases

> 
Add multiple test cases to an agent dataset in a single request. Use for batch imports from production traces.

Maximum 100 test cases per request.



## OpenAPI

````yaml https://app.freeplay.ai/openapi.json post /api/v2/projects/{project_id}/agent-datasets/{dataset_id}/test-cases/bulk
openapi: 3.1.0
info:
  title: Freeplay API
  version: 0.1.0
servers: []
security:
  - BearerAuth: []
paths:
  /api/v2/projects/{project_id}/agent-datasets/{dataset_id}/test-cases/bulk:
    post:
      tags:
        - Agent Datasets
      summary: Bulk Create Agent Test Cases
      description: >-

        Add multiple test cases to an agent dataset in a single request. Use for
        batch imports from production traces.


        Maximum 100 test cases per request.
      operationId: post_bulk_create_agent_dataset_test_cases
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
        - name: dataset_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                data:
                  items:
                    $ref: '#/components/schemas/AgentTestCase'
                  title: Data
                  type: array
              required:
                - data
              title: BulkCreateAgentTestCasesRequest
              type: object
      responses:
        '201':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/AgentTestCaseResponse'
                    title: Data
                    type: array
                required:
                  - data
                title: BulkCreateAgentTestCasesResponse
                type: object
          description: >-
            BulkCreateAgentTestCasesResponse(data:
            list[server.api_routes.agent_datasets_api_v2.AgentTestCaseResponse])
components:
  schemas:
    AgentTestCase:
      properties:
        inputs:
          default: null
          oneOf:
            - $ref: '#/components/schemas/JSONValue'
            - type: 'null'
        outputs:
          default: null
          oneOf:
            - $ref: '#/components/schemas/JSONValue'
            - type: 'null'
        metadata:
          default: null
          title: Metadata
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
              - type: number
              - type: boolean
          type:
            - object
            - 'null'
      title: AgentTestCase
      type: object
    AgentTestCaseResponse:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        input:
          $ref: '#/components/schemas/JSONValue'
          default: null
        output:
          $ref: '#/components/schemas/JSONValue'
          default: null
        metadata:
          default: null
          title: Metadata
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
              - type: number
              - type: boolean
          type:
            - object
            - 'null'
      required:
        - id
      title: AgentTestCaseResponse
      type: object
    JSONValue:
      anyOf:
        - type: boolean
        - type: integer
        - type: number
        - type: string
        - additionalProperties:
            $ref: '#/components/schemas/JSONValue'
          type: object
        - items:
            $ref: '#/components/schemas/JSONValue'
          type: array
        - type: 'null'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````