> ## 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: 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:
  /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'
        user_metadata:
          $ref: '#/components/schemas/UserMetadata'
      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'
        user_metadata:
          $ref: '#/components/schemas/UserMetadata'
      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'
    UserMetadata:
      type: object
      description: >-
        Optional arbitrary metadata object echoed back in the response. Limits:
        at most 16 top-level keys, key names up to 64 characters, nesting depth
        up to 3, total serialized size up to 4 KB. When provided and valid, this
        object is also echoed as a top-level `user_metadata` key on error
        responses (4xx/5xx) of endpoints that accept it; invalid or oversized
        metadata is never echoed, including on the 422 response it causes.
      additionalProperties: true
      maxProperties: 16
      example:
        request_id: abc-123
        source: mobile-app
    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
            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

````

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