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

# Submit Eval Batch

> Submit a batch of (query, response, test_type) rows to the evaluator.

Each sample becomes one record + one eval cell; the eval pillar judges
each row and writes back success/classification/reasoning/confidence.
Verdicts are retrieved via `GET /v1/runs/{run_id}/records`.



## OpenAPI

````yaml POST /rt/eval
openapi: 3.0.0
info:
  title: Enkrypt AI APIs
  version: 2.0.0
servers:
  - url: https://api.enkryptai.com
security:
  - apiKeyAuth: []
tags:
  - name: Guardrails
  - name: Code of Conduct
  - name: Endpoints
  - name: Redteam
    description: >-
      Red Team API: submit red-team / threat-modeling / playground / eval runs,
      then poll run status, records, results and compliance. Also two-phase
      threat modeling (categories + data), dataset retrieval, model health,
      findings and risk mitigation. The previous task-based Red Team API is
      under **Archived**.
  - name: Deployments
  - name: AI Proxy
  - name: Leaderboard
  - name: Archived
  - name: MCP Hub
    description: >-
      MCP Hub vulnerability scanning APIs. Submitting scans (the POST endpoints)
      is open to all authenticated callers. The scan **retrieval** APIs — Get
      Scan Job Status, Get Complete Scan Results, List Scans, and Get MCP Hub
      Scan Statistics (the GET endpoints) — are an **enterprise data-license
      feature**: they require your organization to have MCP Hub API access
      enabled by Enkrypt, otherwise they return `403`. Contact us at
      support@enkryptai.com to enable access.
  - name: MCP Registry Servers
  - name: MCP Gateways
  - name: MCP Playground
  - name: Skill Scanner
    description: >-
      Skill Scanner APIs: submit an agent skill (a directory inside a git
      repository) for security scanning, then read the verdict, the risk level
      and the full report. Scanning is asynchronous — a scan takes roughly 30–90
      seconds, so `POST /skill-hub/scan` returns a `scan_id` you poll.


      You see your organization's scans and nobody else's. The identity comes
      from your API key, never from your request — sending `user_email` is a
      `400`.


      For an organization or project API key, scans are filed under the
      **organization**, so every member sees every scan the organization has
      run, whichever project or member submitted it. For an individual account
      it is simply your own scans. Either way List Skill Scans needs no
      parameter to say who you are.
  - name: Compliance
    description: >-
      Compliance APIs: connect a ChatGPT Enterprise workspace, then keep reading
      its compliance logs and scanning every message through one of your saved
      guardrails.


      Every endpoint here — reads as well as writes — requires the **governance
      officer** role on the project your API key belongs to. The organization
      owner is **not** exempt: an owner who has not been granted the role gets
      `403` like anyone else. An individual (non-organization) account cannot
      hold the role at all, so compliance is an organization-only feature today.


      A scan is addressed by name in the `X-Enkrypt-Scan` header, within the
      project its API key belongs to. Message text is never stored: Get
      Compliance Message fetches it live from the provider, and only while the
      provider still holds it.
paths:
  /rt/eval:
    post:
      tags:
        - Redteam
      summary: Submit Eval Batch
      description: |-
        Submit a batch of (query, response, test_type) rows to the evaluator.

        Each sample becomes one record + one eval cell; the eval pillar judges
        each row and writes back success/classification/reasoning/confidence.
        Verdicts are retrieved via `GET /v1/runs/{run_id}/records`.
      operationId: submit_eval_batch_v1_eval_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RTv2EvalRequest'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RTv2EvalQueuedResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RTv2HTTPValidationError'
components:
  schemas:
    RTv2EvalRequest:
      properties:
        context:
          $ref: '#/components/schemas/RTv2Context'
          nullable: true
        samples:
          items:
            $ref: '#/components/schemas/RTv2EvalSample'
          type: array
          maxItems: 10000
          minItems: 1
          title: Samples
        run_name:
          type: string
          maxLength: 200
          minLength: 1
          nullable: true
          title: Run Name
        user_metadata:
          additionalProperties: true
          type: object
          nullable: true
          title: User Metadata
      additionalProperties: false
      type: object
      required:
        - samples
      title: EvalRequest
      description: |-
        `POST /v1/eval` payload.

        `context.policy_description` is optional grounding for evaluators that
        consult policy text (e.g. the agent judge). `samples` is the non-empty
        list of rows to score.
    RTv2EvalQueuedResponse:
      additionalProperties: true
      type: object
      description: >-
        The accepted eval run. Carries `run_id`, `status_url`, `records_url`,
        `websocket_url` (the SSE progress stream) and `logs_url` (the live log
        socket - join it onto
        `wss://api.enkryptai.com/wss/redteam/v1/logs/tasks/`).
    RTv2HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/RTv2ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RTv2Context:
      properties:
        system_description:
          type: string
          maxLength: 2000
          nullable: true
          title: System Description
        policy_description:
          type: string
          maxLength: 5000
          nullable: true
          title: Policy Description
        policy_rules:
          type: array
          description: >-
            The rules the system is supposed to follow, structured - one object
            per rule. Mutually exclusive with policy_description: send one or
            the other. Naming a saved Code of Conduct policy in the
            X-Enkrypt-Policy header fills this in for a Policy Wizard policy and
            clears policy_description.
          items:
            type: object
            properties:
              id:
                type: string
                title: Id
              text:
                type: string
                title: Text
              risk_category:
                type: string
                title: Risk Category
              severity:
                type: string
                title: Severity
              frameworks:
                type: array
                items:
                  type: string
                title: Frameworks
            additionalProperties: true
          nullable: true
          title: Policy Rules
      additionalProperties: false
      type: object
      title: Context
    RTv2EvalSample:
      properties:
        query:
          type: string
          title: Query
        response:
          title: Response
          type: string
        test_type:
          title: Test Type
          type: string
        category:
          type: string
          enum:
            - safety_harm
            - privacy_data_protection
            - security_fraud
            - bias_fairness_ethical_harm
            - legal_ip_liability
            - brand_reputation_trust
            - product_misuse_abuse
            - performance_reliability_quality
          nullable: true
          title: Category
        goal:
          type: string
          nullable: true
          title: Goal
        tags:
          additionalProperties: true
          type: object
          nullable: true
          title: Tags
      additionalProperties: false
      type: object
      required:
        - query
        - response
        - test_type
      title: EvalSample
      description: |-
        One row of the /v1/eval input.

        `query` + `response` + `test_type` are required. `category`, `goal`,
        and `tags` are optional pass-throughs that flow to the verdict record.
    RTv2ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: apikey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.