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

# Model Health (V3)



## OpenAPI

````yaml POST /redteam/v3/model-health
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/v3/model-health:
    post:
      tags:
        - Archived
      summary: Model Health (V3)
      operationId: v3_model_health_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RedteamV3ModelHealthConfig'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RedteamModelHealthResponse'
components:
  schemas:
    RedteamV3ModelHealthConfig:
      title: RedteamV3ModelHealthConfig
      type: object
      required:
        - endpoint_configuration
      properties:
        endpoint_configuration:
          $ref: '#/components/schemas/ModelCustomRequestObject'
    RedteamModelHealthResponse:
      title: RedteamModelHealthResponse
      type: object
      required:
        - status
      properties:
        status:
          title: Status
          type: string
          enum:
            - healthy
            - unhealthy
        message:
          title: Message
          type: string
          example: Model health check completed successfully
        data:
          title: Data
          type: object
          properties:
            query:
              title: Query
              type: string
              example: What is the capital of India?
            response:
              title: Response
              type: string
              example: The capital of India is New Delhi.
          required:
            - query
            - response
        error:
          title: Error Message
          type: string
          example: Error while checking model health
    ModelCustomRequestObject:
      title: ModelCustomRequestObject
      type: object
      required:
        - model_config
      properties:
        testing_for:
          title: Testing For
          type: string
          description: Purpose of testing
          enum:
            - foundationModels
            - chatbotsAndCopilots
            - agents
            - URL
          example: foundationModels
        model_name:
          title: Model Name
          type: string
          description: Name of the model. Required for foundationModels
          example: mistralai/Mixtral-8x7B-Instruct-v0.1
        certifications:
          title: Certifications
          type: array
          items:
            title: Certification
            type: string
          description: List of certifications
          example:
            - GDPR
            - CCPA
            - HIPAA
            - SOC 2 Type II
            - SOC 3
        model_config:
          title: Model Config
          type: object
          required:
            - model_provider
          properties:
            model_provider:
              title: Model Provider
              type: string
              description: >-
                Provider of the model which determines the request response
                format
              enum:
                - openai
                - together
                - huggingface
                - groq
                - azure_openai
                - anthropic
                - cohere
                - bedrock
                - gemini
                - ai21
                - fireworks
                - alibaba
                - portkey
                - deepseek
                - mistral
                - llama
                - openai_compatible
                - cohere_compatible
                - anthropic_compatible
                - custom
                - url
                - enkryptai
              example: together
            hosting_type:
              title: Hosting Type
              type: string
              description: Hosting type of the model
              enum:
                - External
                - Internal
              example: External
            model_source:
              title: Model Source
              type: string
              description: Source of the model
              example: https://together.ai
            tools:
              title: Tools
              type: array
              items:
                title: Tool
                type: object
                required:
                  - name
                  - description
                properties:
                  name:
                    title: Tool Name
                    type: string
                    description: Name of the tool
                    example: web_search
                  description:
                    title: Tool Description
                    type: string
                    description: Description of what the tool does
                    example: >-
                      The tool web search is used to search the web for
                      information related to finance.
              description: Array of tools available to the model
              example:
                - name: web_search
                  description: >-
                    The tool web search is used to search the web for
                    information related to finance.
            input_modalities:
              title: Input Modalities
              type: array
              description: Types of input that the model can process
              items:
                type: string
                enum:
                  - text
                  - image
                  - audio
              example:
                - text
            output_modalities:
              title: Output Modalities
              type: array
              description: Types of output that the model can generate
              items:
                type: string
                enum:
                  - text
              example:
                - text
            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
            system_prompt:
              title: System Prompt
              type: string
              description: System prompt
              example: ''
            context:
              title: Context
              type: object
              description: >-
                Grounding context stored with the saved model and carried onto
                every `/rt/model/*` run that uses it, so it does not have to be
                repeated in each run body. Same two fields as the rtv2 `context`
                block. An inline `context` on the run body wins over this, and a
                policy named via `X-Enkrypt-Policy` outranks the stored
                `policy_description`; whatever is left unset is filled from
                here.
              properties:
                system_description:
                  title: System Description
                  type: string
                  maxLength: 2000
                  description: >-
                    What the target system is, used to ground attack generation.
                    Distinct from `system_prompt` above, which is text sent TO
                    the target.
                  example: Customer support bot for a bank
                policy_description:
                  title: Policy Description
                  type: string
                  maxLength: 5000
                  description: >-
                    The policy the target is expected to follow. Enables
                    context-aware attacks.
                  example: Customer policy
            connect_via_relay:
              title: Connect Via Relay
              type: boolean
              description: >-
                Reach this model through a **relay bridge** running inside your
                own network rather than dialling `endpoint` from Enkrypt's
                cloud. Save it together with `metadata.relay` below, which names
                the bridge. Only the `/rt/model/*` Red Team endpoints act on it.


                When set, `endpoint` is kept for labelling but never dialled,
                and the API key belongs in `metadata.relay.target_headers`
                rather than in `auth_data`. A relayed saved model cannot be
                health-checked with `POST /rt/model/model-health`; use `GET
                /redteam/relay/v1/relay/bridges/{bridge_id}/status` instead.
              example: true
            endpoint:
              title: Endpoint
              type: object
              required:
                - scheme
                - host
                - port
                - base_path
              properties:
                scheme:
                  title: Scheme
                  type: string
                  description: Scheme of the endpoint
                  example: https
                host:
                  title: Host
                  type: string
                  description: Host of the endpoint
                  example: api.together.xyz
                port:
                  title: Port
                  type: integer
                  description: Port of the endpoint
                  example: 443
                base_path:
                  title: Base Path
                  type: string
                  description: Base path of the endpoint
                  example: /v1
            paths:
              title: Paths
              type: object
              properties:
                completions:
                  title: Completions
                  type: string
                  example: /completions
                chat:
                  title: Chat
                  type: string
                  example: /chat/completions
            auth_data:
              title: Auth Data
              type: object
              properties:
                header_name:
                  title: Header Name
                  type: string
                  example: Authorization
                header_prefix:
                  title: Header Prefix
                  type: string
                  example: Bearer
                space_after_prefix:
                  title: Space After Prefix
                  type: boolean
                  example: true
                param_name:
                  title: Param Name
                  type: string
                  example: token
                azure_client_id:
                  title: Azure Client ID
                  type: string
                  example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                azure_client_secret:
                  title: Azure Client Secret
                  type: string
                  example: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                azure_tenant_id:
                  title: Azure Tenant ID
                  type: string
                  example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                gcp_service_account_json:
                  title: GCP Service Account JSON
                  type: string
                  example: >-
                    {"type":"service_account","project_id":"xxxxxxxx","private_key_id":"xxxxxxxx","private_key":"xxxxxxxx","client_email":"xxxxxxxx","client_id":"xxxxxxxx","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/xxxxxxxx@xxxxxxxx.iam.gserviceaccount.com"}
                aws_access_key_id:
                  title: AWS Access Key ID
                  type: string
                  example: xxxxxxxx
                aws_secret_access_key:
                  title: AWS Secret Access Key
                  type: string
                  example: xxxxxxxx
                allow_override:
                  title: Allow Override
                  type: boolean
                  description: >-
                    If enabled, the authorization header or parameter can be
                    overridden in the request by the value configured here
                  example: false
            apikeys:
              title: API Keys
              type: array
              items:
                title: API Key
                type: string
              example:
                - TOGETHER_AI_API_KEY
            model_auth_type:
              title: Model Auth Type (apikey or jwt)
              type: string
              enum:
                - apikey
                - jwt
              example: apikey
            model_jwt_config:
              title: Model Custom Auth Token Config
              type: object
              properties:
                jwt_method:
                  title: Token Method
                  type: string
                  enum:
                    - POST
                    - GET
                  example: POST
                jwt_url:
                  title: Token URL
                  type: string
                  example: https://example.com/api/auth
                jwt_headers:
                  type: array
                  title: Custom Token Headers
                  description: Array of custom headers to be sent with token requests
                  items:
                    type: object
                    required:
                      - key
                      - value
                    properties:
                      key:
                        type: string
                        title: Header Key
                        description: The name/key of the custom header
                        example: x-custom-header
                      value:
                        type: string
                        title: Header Value
                        description: The value of the custom header
                        example: custom-value
                  example:
                    - key: content-type
                      value: application/x-www-form-urlencoded
                    - key: x-custom-header
                      value: custom-value
                jwt_body:
                  type: string
                  title: Token Body
                  description: The body of the token request
                  example: >-
                    grant_type=client_credentials&client_id=xxxxxxxxxx&client_secret=xxxxxxxxxx
                jwt_response_key:
                  type: string
                  title: JWT Response Key
                  description: The key of the token in the response in jq format
                  example: .access_token
            custom_curl_command:
              title: Custom Curl Command
              type: string
              example: |-
                curl --location 'https://example.com/api/chat' \
                --header 'Accept: application/json, text/plain, */*' \
                --header 'Accept-Language: en-US,en;q=0.9' \
                --header 'Authorization: {token}' \
                --header 'Connection: keep-alive' \
                --header 'Content-Type: application/json' \
                --data '{"prompt":"{prompt}"}'
            custom_headers:
              type: array
              title: Custom Headers
              description: Array of custom headers to be sent with requests
              items:
                type: object
                required:
                  - key
                  - value
                properties:
                  key:
                    type: string
                    title: Header Key
                    description: The name/key of the custom header
                    example: X-Custom-Header
                  value:
                    type: string
                    title: Header Value
                    description: The value of the custom header
                    example: custom-value
              example:
                - key: X-Custom-Header
                  value: custom-value
            custom_payload:
              type: object
              title: Custom Payload
              description: >-
                A flexible object that can contain any custom key-value pairs
                for the request payload. Only condition is to include {prompt}
                in the payload.
              additionalProperties: true
              example:
                messages:
                  - role: developer
                    content: You are a helpful assistant.
                  - role: user
                    content: '{prompt}'
            custom_response_content_type:
              type: string
              title: Custom Response Content Type
              description: >-
                Content type of the custom response. Currently only supports
                JSON.
              enum:
                - json
              example: json
            custom_response_format:
              type: string
              title: Custom Response Format
              description: >-
                Optional response format path. Jq format for json type (e.g.
                '.choices[0].message.content')
              example: .choices[0].message.content
            metadata:
              title: Metadata
              type: object
              properties:
                max_tokens:
                  title: Max Tokens
                  type: integer
                  example: 2048
                input_cost_1M_tokens:
                  title: Input Cost 1M Tokens
                  type: number
                  example: 2.5
                output_cost_1M_tokens:
                  title: Output Cost 1M Tokens
                  type: number
                  example: 10
                azure_instance:
                  title: Azure Instance
                  type: string
                  description: If Azure, it's instance type
                  example: enkrypt2024
                azure_api_version:
                  title: Azure API Version
                  type: string
                  description: If Azure, it's API version
                  example: '2024-02-01'
                azure_deployment_id:
                  title: Azure Deployment ID
                  type: string
                  description: If Azure, it's deployment ID
                  example: gpt3
                anthropic_version:
                  title: Anthropic Version
                  type: string
                  description: If Anthropic, it's version
                  example: ''
                llama2_format:
                  title: Llama2 Format
                  type: string
                  description: If Llama2, it's format
                  enum:
                    - openai
                  example: openai
                mistral_format:
                  title: Mistral Format
                  type: string
                  description: If Mistral, it's format
                  enum:
                    - openai
                    - ollama
                  example: openai
                gemini:
                  title: Gemini
                  type: object
                  properties:
                    api_endpoint:
                      title: API Endpoint
                      type: string
                      description: >-
                        If running Gemini on Vertex, specify the regional API
                        endpoint (hostname only)
                      example: ''
                    project_id:
                      title: Project ID
                      type: string
                      description: If running Gemini on Vertex, specify the project ID
                      example: ''
                    location_id:
                      title: Location ID
                      type: string
                      description: If running Gemini on Vertex, specify the location ID
                      example: ''
                bedrock:
                  title: Bedrock
                  type: object
                  properties:
                    aws_region:
                      title: AWS Region
                      type: string
                      description: >-
                        If using AWS providers (Bedrock) you can override the
                        default AWS_REGION 'us-east-1' by setting this option
                      example: ''
                enkryptai:
                  title: EnkryptAI
                  type: object
                  properties:
                    deployment_name:
                      title: Deployment Name
                      type: string
                      description: If using EnkryptAI, specify the deployment name
                      example: test-deployment-1
                relay:
                  title: Relay
                  type: object
                  description: >-
                    Routing for a model reached through a **relay bridge**
                    inside your own network. Unlike every other key in
                    `metadata`, this one is not provider-specific - the bridge
                    fronts whatever you run behind it - and it is the only
                    `metadata` key the `/rt/model/*` Red Team endpoints
                    understand. Set it together with
                    `model_config.connect_via_relay: true`; one without the
                    other is rejected when the model is used. Saving `relay`
                    alongside provider metadata is also rejected by
                    `/rt/model/*`, because the provider half could not be
                    carried over.
                  required:
                    - bridge_id
                    - target_endpoint
                  properties:
                    bridge_id:
                      title: Bridge ID
                      type: string
                      description: >-
                        Which of your connected bridges to route through. Must
                        equal the id that bridge registered with.
                      example: customer-bridge-1
                    target_endpoint:
                      title: Target Endpoint
                      type: string
                      description: >-
                        The full URL inside your own network that the bridge
                        will POST to. This is what is actually called;
                        `model_config.endpoint` becomes a label.
                      example: https://customer-internal-llm.local/v1/chat/completions
                    model_name:
                      title: Model Name
                      type: string
                      description: >-
                        The identifier your own LLM expects. Optional here -
                        unlike on an inline `target.metadata.relay`, it falls
                        back to the saved model's own `model_name`.
                      example: their-internal-model
                    target_headers:
                      title: Target Headers
                      type: object
                      additionalProperties:
                        type: string
                      description: >-
                        Headers forwarded verbatim to your LLM by the bridge.
                        Credentials for your own endpoint belong here rather
                        than in the saved model's API key.
                      example:
                        Authorization: Bearer customer-side-internal-key
            default_request_options:
              title: Default Request Options
              type: object
              properties:
                temperature:
                  title: Temperature
                  type: number
                  example: 1
                top_p:
                  title: Top P
                  type: number
                  example: 1
                top_k:
                  title: Top K
                  type: integer
                  example: 0
      example:
        testing_for: foundationModels
        model_name: mistralai/Mixtral-8x7B-Instruct-v0.1
        certifications: []
        model_config:
          model_provider: together
          hosting_type: External
          input_modalities:
            - text
          output_modalities:
            - text
          model_source: https://together.ai
          rate_per_min: 20
          system_prompt: ''
          context:
            system_description: Customer support bot for a bank
            policy_description: Customer policy
          endpoint:
            scheme: https
            host: api.together.xyz
            port: 443
            base_path: /v1
          paths:
            completions: /completions
            chat: /chat/completions
          auth_data:
            header_name: Authorization
            header_prefix: Bearer
            space_after_prefix: true
          apikeys:
            - xxxxx
          metadata: {}
          default_request_options: {}
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: apikey

````

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