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

# Detect Audio

> Analyze audio with text using individual multimodal guardrails detectors



## OpenAPI

````yaml POST /guardrails/detect-audio
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:
  /guardrails/detect-audio:
    post:
      tags:
        - Guardrails
      summary: >-
        Analyze audio with text using individual multimodal guardrails
        detectors.
      description: >-
        Takes a base64-encoded audio file, accompanying text input, and a
        detectors configuration. Runs the enabled detectors (toxicity, nsfw,
        injection_attack, pii, policy_violation) on the multimodal content and
        returns per-detector results in the same summary/details format as text
        guardrails. For policy_violation: if its config's `rules` array is
        present it takes precedence over `policy_text`, and the response detail
        includes `violated_rules`; if `rules` is absent, legacy `policy_text`
        behavior is unchanged.
      operationId: detectAudio
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DetectAudioRequestBody'
      responses:
        '200':
          description: Multimodal audio detection results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MultimodalGuardrailsResponseBody'
              examples:
                safe_content:
                  summary: All detectors pass
                  value:
                    summary:
                      toxicity: 0
                      injection_attack: 0
                    details:
                      toxicity:
                        toxicity: Toxicity Not Detected
                      injection_attack:
                        injection_attack: Injection Attack Not Detected
                unsafe_content:
                  summary: Injection attack detected in audio
                  value:
                    summary:
                      toxicity: 0
                      injection_attack: 1
                    details:
                      toxicity:
                        toxicity: Toxicity Not Detected
                      injection_attack:
                        injection_attack: Injection Attack Detected
components:
  schemas:
    DetectAudioRequestBody:
      title: DetectAudioRequestBody
      type: object
      properties:
        text_input:
          type: string
          description: The text prompt to accompany the audio for analysis.
        audio_data:
          type: string
          description: Base64-encoded audio file content.
        detectors:
          $ref: '#/components/schemas/MultimodalDetectorsConfig'
        user_metadata:
          $ref: '#/components/schemas/UserMetadata'
      required:
        - text_input
        - audio_data
        - detectors
    MultimodalGuardrailsResponseBody:
      title: MultimodalGuardrailsResponseBody
      type: object
      required:
        - summary
        - details
      properties:
        summary:
          type: object
          description: Per-detector integer flags (1 = detected, 0 = not detected).
          additionalProperties:
            type: integer
            enum:
              - 0
              - 1
          example:
            toxicity: 0
            nsfw: 0
            pii: 1
            injection_attack: 0
            policy_violation: 0
        details:
          type: object
          description: >-
            Per-detector detail objects containing human-readable results and
            any extra fields (e.g. entities for PII; explanation, and — when the
            policy_violation config used the structured rules array —
            violated_rules, for policy_violation).
          additionalProperties:
            type: object
          example:
            toxicity:
              toxicity: Toxicity Not Detected
            nsfw:
              nsfw: NSFW Not Detected
            pii:
              entities:
                person:
                  John Doe: <person_0>
            injection_attack:
              injection_attack: Injection Attack Not Detected
            policy_violation:
              policy_violation: Policy Violation Not Detected
        user_metadata:
          $ref: '#/components/schemas/UserMetadata'
    MultimodalDetectorsConfig:
      title: MultimodalDetectorsConfig
      type: object
      description: >-
        Configuration for multimodal detectors. Each key is a detector name with
        an object specifying its settings. Supported detectors: toxicity, nsfw,
        injection_attack, pii, policy_violation.
      properties:
        toxicity:
          type: object
          description: Toxicity detector configuration.
          properties:
            enabled:
              type: boolean
              description: Whether to run toxicity detection.
          required:
            - enabled
        nsfw:
          type: object
          description: NSFW detector configuration.
          properties:
            enabled:
              type: boolean
              description: Whether to run NSFW detection.
          required:
            - enabled
        injection_attack:
          type: object
          description: Injection attack detector configuration.
          properties:
            enabled:
              type: boolean
              description: Whether to run injection attack detection.
          required:
            - enabled
        pii:
          type: object
          description: PII detector configuration.
          properties:
            enabled:
              type: boolean
              description: Whether to run PII detection.
            entities:
              type: array
              items:
                type: string
              description: >-
                List of PII entity types to detect (e.g. person, phone, email,
                address, credit_card, ssn, date_of_birth, driver_license,
                passport, bank_account, ip_address). If omitted, all entity
                types are detected.
          required:
            - enabled
        policy_violation:
          type: object
          description: >-
            Policy violation detector configuration. Provide EITHER the
            structured `rules` array (preferred, the Policy Wizard's `enabled`
            rule objects) OR `policy_text` (legacy). If `rules` is present it
            takes precedence, and the response detail gains a `violated_rules`
            array; if `rules` is absent, behavior is unchanged (no
            `violated_rules`).
          properties:
            enabled:
              type: boolean
              description: Whether to run policy violation detection.
            rules:
              type: array
              description: >-
                NEW — the structured rule set to enforce (the Policy Wizard's
                `enabled` rule objects). Takes precedence over policy_text when
                both are given.
              items:
                $ref: '#/components/schemas/Rule'
            policy_text:
              type: string
              description: >-
                The policy rules to check against. Required when enabled, unless
                rules is provided instead.
            need_explanation:
              type: boolean
              default: false
              description: >-
                Whether to include a brief explanation of the policy violation
                assessment.
          required:
            - enabled
      example:
        toxicity:
          enabled: true
        nsfw:
          enabled: true
        injection_attack:
          enabled: true
        pii:
          enabled: true
          entities:
            - person
            - phone
            - email
        policy_violation:
          enabled: true
          policy_text: No violent or illegal content allowed.
          need_explanation: true
    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
    Rule:
      title: Rule
      type: object
      properties:
        id:
          title: Id
          type: string
          example: priv-1
        display_text:
          title: Display Text
          type: string
          example: No individualized investment advice
        text:
          title: Text
          type: string
          example: The assistant must not provide individualized investment advice.
        risk_category:
          title: Risk Category
          type: string
          example: legal_ip_liability
          enum:
            - security_fraud
            - safety_harm
            - privacy_data_protection
            - brand_reputation_trust
            - bias_fairness_ethical
            - legal_ip_liability
            - product_misuse_abuse
            - performance_reliability_quality
        applicability:
          title: Applicability
          type: string
          example: assistant
          enum:
            - assistant
            - user
            - user_assistant
        severity:
          title: Severity
          type: string
          example: medium
          enum:
            - critical
            - high
            - medium
            - low
        frameworks:
          title: Frameworks
          type: array
          items:
            type: string
            enum:
              - hipaa
              - finra
              - gdpr
              - ccpa
              - owasp_llm_2025
              - nist_ai_rmf
              - eu_ai_act
              - iso_42001
        mappings:
          title: Mappings
          type: array
          items:
            type: object
            properties:
              framework:
                type: string
              clause:
                type: string
        source:
          title: Source
          type: string
          example: document
          enum:
            - document
            - catalog
            - document/catalog
            - user
        suggested:
          title: Suggested
          type: boolean
          example: false
      required:
        - id
        - text
        - risk_category
        - applicability
        - severity
        - source
        - suggested
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: apikey

````

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