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

# Bulk create tests

> Create many test cases at once and link them to your agents



## OpenAPI

````yaml /api-reference/openapi.json post /tests/bulk
openapi: 3.1.0
info:
  title: Calibrate Public API
  version: 0.1.0
  description: Programmatic API for CI/automation. Pass your key in the `X-API-Key` header.
servers:
  - url: https://api.calibrate.artpark.ai
    description: Production
security: []
paths:
  /tests/bulk:
    post:
      tags:
        - tests
      summary: Bulk create tests
      description: Create many test cases at once and link them to your agents
      operationId: bulk_upload_tests_tests_bulk_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkTestUpload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkTestUploadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    BulkTestUpload:
      properties:
        type:
          type: string
          enum:
            - response
            - tool_call
            - conversation
          title: Type
          description: |-
            What the test judges:

            - `response`: judges the generated reply
            - `tool_call`: diffs the generated tool calls
            - `conversation`: judges the full conversation


            Applied to every test in the batch
        tests:
          items:
            $ref: '#/components/schemas/BulkTestItem'
          type: array
          title: Tests
          description: >-
            Test items to create, at most 500 per request, with names unique
            within the batch
        agent_uuids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Agent Uuids
          description: IDs of agents to link every created test to. Omit to link none
          examples:
            - - a3b2c1d0-e5f4-3210-abcd-ef1234567890
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
          description: >-
            Language written to each test's `config.settings.language`. Omit to
            leave unset
      type: object
      required:
        - type
        - tests
      title: BulkTestUpload
    BulkTestUploadResponse:
      properties:
        uuids:
          items:
            type: string
          type: array
          title: Uuids
          description: IDs of the created tests, in request order
          examples:
            - - b1c2d3e4-f5a6-7890-bcde-f12345678901
        count:
          type: integer
          title: Count
          description: Number of tests created
        message:
          type: string
          title: Message
          description: Confirmation message
        warnings:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Warnings
          description: Non-fatal issues, such as agents some tests could not be linked to
      type: object
      required:
        - uuids
        - count
        - message
      title: BulkTestUploadResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BulkTestItem:
      properties:
        name:
          type: string
          title: Name
          description: Name of the test, unique within the workspace and within the batch
        conversation_history:
          items:
            $ref: '#/components/schemas/ChatMessage'
          type: array
          title: Conversation History
          description: Ordered messages ending at the user turn the agent should answer
        evaluators:
          anyOf:
            - items:
                $ref: '#/components/schemas/routers__tests__EvaluatorRef'
              type: array
            - type: 'null'
          title: Evaluators
          description: Evaluators to link. Used by `response` and `conversation` tests
        tool_calls:
          anyOf:
            - items:
                $ref: '#/components/schemas/ExpectedToolCall'
              type: array
            - type: 'null'
          title: Tool Calls
          description: Expected tool calls. **Required for `tool_call` batches**
      type: object
      required:
        - name
        - conversation_history
      title: BulkTestItem
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ChatMessage:
      properties:
        role:
          type: string
          enum:
            - user
            - assistant
            - tool
          title: Role
          description: Message author role in the conversation history
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
          description: >-
            Message text. Omit for assistant messages that only carry
            `tool_calls`
        tool_calls:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: Tool calls issued by the assistant. Omit for plain text turns
        tool_call_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Call Id
          description: >-
            ID of the tool call this message responds to. **Required for
            `role=tool`**
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Tool name for `role=tool` messages. Omit otherwise
      type: object
      required:
        - role
      title: ChatMessage
    routers__tests__EvaluatorRef:
      properties:
        evaluator_uuid:
          type: string
          maxLength: 36
          minLength: 36
          title: Evaluator Uuid
          description: Evaluator to attach to the test
          examples:
            - f47ac10b-58cc-4372-a567-0e02b2c3d479
        variable_values:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            Values for the evaluator's `{{placeholder}}` variables, pinned on
            this test. Omit to inherit the evaluator version's defaults
          examples:
            - criteria: The reply must cite the refund window
      additionalProperties: false
      type: object
      required:
        - evaluator_uuid
      title: EvaluatorRef
    ExpectedToolCall:
      properties:
        tool:
          type: string
          title: Tool
          description: Name of the tool the agent is expected to call
        arguments:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            Expected argument values, diffed against the generated call. Omit to
            expect no arguments
        accept_any_arguments:
          type: boolean
          title: Accept Any Arguments
          description: >-
            When `true`, only the tool name must match and `arguments` is
            ignored
          default: false
      type: object
      required:
        - tool
      title: ExpectedToolCall
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````