---
title: "Prompt Analyzer"
method: POST
path: "/api/v1/submit/prompt-analyzer"
tags: ["interactions-v1_other"]
---

# Prompt Analyzer

`POST /api/v1/submit/prompt-analyzer`

Analyze LLM Prompt and Response

## Request body

- PromptAnalyzerRequest — The request to the prompt analyzer endpoint
  - `prompt` string, required
  - `output` string
  - `model` string

## Response `200`

Successful Prompt Analyzer response

- HiddenLayerPromptAnalyzerResponse
  - `response` HiddenLayerPromptAnalyzerResponseMetadata
    - `provider` string
    - `model` string
    - `prompt` string
    - `output` string
    - `unmodified_prompt` string
    - `unmodified_output` string
  - `provider` string
  - `model` string
  - `verdict` boolean — The overall verdict of the analysis
  - `categories` HiddenLayerAnalysisCategories — The analysis detection categories
    - `unsafe_input` boolean — The input is unsafe
    - `unsafe_output` boolean — The output is unsafe
    - `prompt_injection` boolean — The input contains prompt injection
    - `input_dos` boolean — The input contains a denial of service attack
    - `input_pii` boolean — The input contains personally identifiable information
    - `output_pii` boolean — The output contains personally identifiable information
    - `input_code` boolean — The input contains code
    - `output_code` boolean — The output contains code
    - `guardrail` boolean — The input activated the upstream guardrails
    - `input_language` boolean — The input contains a disallowed language
  - `results` HiddenLayerAnalysisResults — The analysis results
    - `input_block_list_results` object — The input block list results
      - `verdict` boolean — The verdict of the input block list analysis
      - `matches` string[]
      - `elapsed_ms` number — The time in milliseconds it took to process the input block list
    - `prompt_injection_classifier_results` object[]
      - `version` number — The version of the prompt injection classifier
      - `verdict` boolean — The verdict of the prompt injection classifier
      - `probabilities` number[]
      - `elapsed_ms` number — The time in milliseconds it took to process the prompt injection classifier
      - `allow_overrides` string[] — The list of allow overrides applied to the prompt
      - `block_overrides` string[] — The list of block overrides applied to the prompt
      - `appeal` object — Appeal details for the prompt injection decision, if any
    - `input_dos_results` object — The input denial of service results
      - `verdict` boolean — The verdict of the input denial of service analysis
      - `elapsed_ms` number — The time in milliseconds it took to process the input denial of service
      - `embeddings_length` number — The length of the embeddings analyzed
    - `input_pii_results` object — The input personally identifiable information results
      - `verdict` boolean — The verdict of the input personally identifiable information analysis
      - `entities` string[]
      - `elapsed_ms` number — The time in milliseconds it took to process the input personally identifiable information
    - `output_pii_results` object — The output personally identifiable information results
      - `verdict` boolean — The verdict of the output personally identifiable information analysis
      - `entities` string[]
      - `elapsed_ms` number — The time in milliseconds it took to process the output personally identifiable information
    - `input_code_results` object — The input code results
      - `verdict` boolean — The verdict of the input code analysis
      - `elapsed_ms` number — The time in milliseconds it took to process the input code
    - `output_code_results` object — The output code results
      - `verdict` boolean — The verdict of the output code analysis
      - `elapsed_ms` number — The time in milliseconds it took to process the output code
    - `guardrail_results` object — The guardrail results
      - `verdict` boolean — The verdict of the guardrail analysis
      - `elapsed_ms` number — The time in milliseconds it took to process the guardrail
      - `refusal_classifier_results` object — The refusal classifier results
        - `version` number — The version of the refusal classifier
        - `verdict` boolean — The verdict of the refusal classifier
        - `probabilities` number[]
        - `elapsed_ms` number — The time in milliseconds it took to process the refusal classifier
    - `input_url_results` object — The input URL results
      - `urls` string[]
      - `elapsed_ms` number — The time in milliseconds it took to process the guardrail
    - `output_url_results` object — The output URL results
      - `urls` string[]
      - `elapsed_ms` number — The time in milliseconds it took to process the guardrail
    - `input_language_results` object — The input language results
      - `verdict` boolean — The verdict of the input language analysis
      - `language` string — Language detected in the input
      - `elapsed_ms` number — The time in milliseconds it took to process the input language detection
  - `policy` HiddenLayerAnalysisPolicy — The policy used during analysis
    - `block_unsafe` boolean — Block unsafe input and output
    - `block_unsafe_input` boolean — Block unsafe input
    - `block_unsafe_output` boolean — Block unsafe output
    - `skip_prompt_injection_detection` boolean — Skip prompt injection detection
    - `block_prompt_injection` boolean — Block prompt injection
    - `prompt_injection_scan_type` 'quick' | 'full' — The type of prompt injection scan to use
    - `skip_input_pii_detection` boolean — Skip input personally identifiable information detection
    - `skip_output_pii_detection` boolean — Skip output personally identifiable information detection
    - `block_input_pii` boolean — Block input personally identifiable information
    - `block_output_pii` boolean — Block output personally identifiable information
    - `redact_input_pii` boolean — Redact input personally identifiable information
    - `redact_output_pii` boolean — Redact output personally identifiable information
    - `redact_type` 'entity' | 'strict' — The type of redaction to use
    - `entity_type` 'strict' | 'all' — The type of entity to redact
    - `skip_input_code_detection` boolean — Skip input code detection
    - `skip_output_code_detection` boolean — Skip output code detection
    - `block_input_code_detection` boolean — Block input code detection
    - `block_output_code_detection` boolean — Block output code detection
    - `skip_guardrail_detection` boolean — Skip guardrail detection
    - `block_guardrail_detection` boolean — Block guardrail detection
    - `skip_input_url_detection` boolean — Skip input URL detection
    - `skip_output_url_detection` boolean — Skip output URL detection
    - `skip_input_dos_detection` boolean — Skip input denial of service detection
    - `block_input_dos_detection` boolean — Block input denial of service detection
    - `input_dos_detection_threshold` number — The threshold for input denial of service detection
  - `frameworks` HiddenLayerAnalysisFrameworks — The framework labels identified during analysis
    - `mitre` object[]
      - `name` string — The name of the MITRE Atlas framework label
      - `label` string — The label of the MITRE Atlas framework label
    - `owasp` object[]
      - `name` string — The name of the OWASP framework label
      - `label` string — The label of the OWASP framework label
    - `owasp:2025` object[]
      - `name` string — The name of the OWASP:2025 framework label
      - `label` string — The label of the OWASP:2025 framework label
  - `elapsed_ms` number — The time in milliseconds it took to process the request
  - `upstream_elapsed_ms` number — The time in milliseconds the upstream LLM took to process the request

---

[API](https://skmtc.net/hiddenlayerai/apis/hiddenlayer-audit-api.md) · [All operations](https://skmtc.net/hiddenlayerai/apis/hiddenlayer-audit-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hiddenlayerai/hiddenlayer-audit-api/revisions/efca861e915b/schema)
