> ## 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.

# Add Task with saved model



## OpenAPI

````yaml POST /redteam/v2/model/add-task
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: Datasets
  - name: Redteam
  - 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
paths:
  /redteam/v2/model/add-task:
    post:
      tags:
        - Archived
      summary: Add Task with saved model
      operationId: model_add_task_post
      parameters:
        - name: X-Enkrypt-Model
          in: header
          required: true
          schema:
            title: Model Name
            type: string
            description: The model saved name. E.g. Test Model
            example: Test Model
        - name: X-Enkrypt-Model-Version
          in: header
          required: true
          schema:
            title: Model Version
            type: string
            description: The model version. Default is 'v1'
            example: v1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RedteamConfigWihoutModel'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RedteamAddTaskResponse'
components:
  schemas:
    RedteamConfigWihoutModel:
      title: RedteamConfigWihoutModel
      properties:
        test_name:
          type: string
          title: Test Name
          example: Test 1
        dataset_name:
          type: string
          title: Dataset Name. standard or your custom dataset
          example: standard
        redteam_test_configurations:
          $ref: '#/components/schemas/RedteamTestConfigurations'
      type: object
      required:
        - redteam_test_configurations
    RedteamAddTaskResponse:
      title: RedteamAddTaskResponse
      type: object
      properties:
        status:
          title: Status
          type: string
          description: Status of the task
          enum:
            - Success
            - Failed
          example: Success
        message:
          title: Message
          type: string
          example: Redteam task has been added successfully
        task_id:
          type: string
          title: Task Id
          example: generate-and-redteam-6c3babbe-3bc4-4553-a0b7-454df720579f
        data:
          $ref: '#/components/schemas/RedteamResponseConfig'
      required:
        - task_id
    RedteamTestConfigurations:
      title: RedteamTestConfigurations
      type: object
      properties:
        bias_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        cbrn_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        csem_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        harmful_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        insecure_code_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        toxicity_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        pii_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        copyright_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        misinformation_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        system_prompt_extractions_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        sponge_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        competitor_test:
          $ref: '#/components/schemas/RedteamCompetitorTestConfiguration'
        adv_bias_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        adv_info_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        adv_tool_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        adv_command_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        adv_pii_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        adv_competitor_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        custom_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        alignment_and_governance_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        input_and_content_integrity_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        infrastructure_and_integration_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        security_and_privacy_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        human_factors_and_societal_impact_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        access_control_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        physical_and_actuation_safety_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        reliability_and_monitoring_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        governance_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        agent_output_quality_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        tool_misuse_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        privacy_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        reliability_and_observability_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        agent_behaviour_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        access_control_and_permissions_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
        tool_extraction_test:
          $ref: '#/components/schemas/RedteamTestConfiguration'
    RedteamResponseConfig:
      title: RedteamResponseConfig
      type: object
      additionalProperties: true
      properties:
        test_name:
          type: string
          title: Test Name
          example: Test 1
        dataset_name:
          type: string
          title: Dataset Name. standard or your custom dataset
          example: standard
        created_at:
          type: string
          format: date-time
          title: Created At
          example: '2025-04-16T16:33:36.009729+00:00'
        model_name:
          type: string
          title: Model Name
          example: mistralai/Mistral-7B-Instruct-v0.1
        id:
          type: string
          title: UUID
          example: 9a010225-ca18-456b-9513-xxxxxxx
        status:
          type: string
          title: Status
          description: Status of the task
          enum:
            - Queued
            - Running
            - Finished
            - Failed
          example: Queued
        redteam_config:
          $ref: '#/components/schemas/RedteamTestConfigurations'
        model_config:
          title: RedteamTargetModelConfiguration
          type: object
          additionalProperties: true
          properties:
            model_name:
              type: string
              title: Model Name
              example: mistralai/Mistral-7B-Instruct-v0.1
            testing_for:
              type: string
              title: Model Type
              enum:
                - foundationModels
                - chatbotsAndCopilots
                - agents
                - URL
              example: Copilot
            model_version:
              type: string
              title: Model Version
              example: v1
            model_source:
              type: string
              title: Model Source
              example: https://together.ai
            model_provider:
              type: string
              title: Model Provider
              example: together
              enum:
                - openai
                - together
                - huggingface
                - groq
                - azure_openai
                - anthropic
                - cohere
                - bedrock
                - gemini
                - ai21
                - fireworks
                - alibaba
                - portkey
                - deepseek
                - mistral
                - llama
                - openai_compatible
                - custom
                - url
                - enkryptai
                - sierra
                - boxai
                - nutanix
                - xactly
            model_endpoint_url:
              type: string
              title: Model Endpoint Url
              example: https://api.together.xyz/v1/chat/completions
            system_prompt:
              type: string
              title: System Prompt
              example: ''
            rate_per_min:
              type: number
              title: Rate Per Min that the model supports.
              description: >-
                < 100 won't enable async. > 100 will enable async mode. > 200 we
                can run boosted async (all tests in parallel). Default 20.
              example: 20
      example:
        status: Success
        message: Redteam task has been added successfully
        task_id: generate-and-redteam-dd42eac8-ce07-4e79-8ee2-8b7dba083a76
        data:
          id: 9a010225-ca18-456b-9513-xxxxxxx
          test_name: Test Old v2
          created_at: '2025-04-16T16:33:36.009729+00:00'
          job_id: generate-and-redteam-dd42eac8-ce07-4e79-8ee2-8b7dba083a76
          dataset_name: standard
          model_name: Mistral-7B-Instruct-v0.1
          model_config:
            testing_for: foundationModels
            model_name: mistralai/Mistral-7B-Instruct-v0.1
            rpm: null
            model_version: null
            system_prompt: ''
            conversation_template: null
            model_source: null
            model_provider: together
            model_endpoint_url: https://api.together.xyz/v1/chat/completions
            rate_per_min: 10
            input_modalities: null
            output_modalities: null
            custom_curl_command: null
            custom_headers: null
            custom_payload: null
            custom_response_content_type: null
            custom_response_format: null
            tools: null
            metadata: null
          redteam_config:
            harmful_test:
              sample_percentage: 1
              attack_methods:
                basic:
                  - basic
          status: Queued
          location: >-
            9a010225-ca18-456b-9513-xxxxxxx/red-team-dd42eac8-ce07-4e79-8ee2-8b7dba083a76
          run_name: null
          project_name: default
          actioner_email: null
          test_version: 3
          model_saved_name: null
          model_version: null
          coc_policy_name: null
    RedteamTestConfiguration:
      title: RedteamTestConfiguration
      type: object
      required:
        - sample_percentage
      properties:
        sample_percentage:
          type: integer
          title: Sample Percentage
          example: 1
        attack_methods:
          title: Attack Methods
          type: object
          properties:
            basic:
              title: Basic
              type: array
              items:
                type: string
                enum:
                  - basic
              example:
                - basic
            advanced:
              title: Advanced
              type: object
              properties:
                static:
                  title: Static
                  type: array
                  items:
                    title: Static
                    type: string
                    enum:
                      - encoding
                      - single_shot
                      - lang_fr
                      - lang_it
                      - lang_hi
                      - lang_es
                      - lang_ja
                      - masking
                      - figstep
                      - hades
                      - echo
                      - speed
                      - pitch
                      - reverb
                      - noise
                  example:
                    - encoding
                dynamic:
                  title: Dynamic
                  type: array
                  items:
                    title: Dynamic
                    type: string
                    enum:
                      - iterative
                      - jood
                  example:
                    - iterative
        frameworks:
          title: Frameworks
          type: array
          items:
            type: string
          description: List of frameworks to use for testing
          example:
            - ISO
            - NIST AI 600
            - AIUC-1
            - EU AI Act
            - OWASP LLM Top 10
            - OWASP Agent Security
      example:
        sample_percentage: 1
        attack_methods:
          basic:
            - basic
        frameworks:
          - ISO
          - NIST AI 600
          - AIUC-1
          - EU AI Act
          - OWASP LLM Top 10
          - OWASP Agent Security
    RedteamCompetitorTestConfiguration:
      title: RedteamCompetitorTestConfiguration
      type: object
      required:
        - sample_percentage
        - competitors_list
        - system_description
      properties:
        sample_percentage:
          type: integer
          title: Sample Percentage
          example: 1
        attack_methods:
          title: Attack Methods
          type: object
          properties:
            basic:
              title: Basic
              type: array
              items:
                type: string
                enum:
                  - basic
              example:
                - basic
            advanced:
              title: Advanced
              type: object
              properties:
                static:
                  title: Static
                  type: array
                  items:
                    title: Static
                    type: string
                    enum:
                      - encoding
                      - single_shot
                      - lang_fr
                      - lang_it
                      - lang_hi
                      - lang_es
                      - lang_ja
                      - masking
                      - figstep
                      - hades
                      - echo
                      - speed
                      - pitch
                      - reverb
                      - noise
                  example:
                    - encoding
                dynamic:
                  title: Dynamic
                  type: array
                  items:
                    title: Dynamic
                    type: string
                    enum:
                      - iterative
                      - jood
                  example:
                    - iterative
        competitors_list:
          title: Competitors List
          type: array
          items:
            type: string
          example:
            - competitor_1
            - competitor_2
            - competitor_3
        system_description:
          title: System Description
          type: string
          example: >-
            Only talk about ACME company and do not praise or mention any of the
            competitors
        frameworks:
          title: Frameworks
          type: array
          items:
            type: string
          description: List of frameworks to use for testing
          example:
            - ISO
            - NIST AI 600
            - AIUC-1
            - EU AI Act
            - OWASP LLM Top 10
            - OWASP Agent Security
      example:
        sample_percentage: 1
        attack_methods:
          basic:
            - basic
        competitors_list:
          - competitor_1
          - competitor_2
        system_description: >-
          Only talk about ACME company and do not praise or mention any of the
          competitors
        frameworks:
          - ISO
          - NIST AI 600
          - AIUC-1
          - EU AI Act
          - OWASP LLM Top 10
          - OWASP Agent Security
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: apikey

````