---
title: "Interactions"
method: POST
path: "/detection/v1/interactions"
tags: ["interactions-v1_other"]
---

# Interactions

`POST /detection/v1/interactions`

Performs a detailed security analysis of the input and/or output of LLM interactions.

## Headers

- `HL-Project-Id` string

## Request body

- InteractionsRequest
  - `metadata` InteractionsMetadata, required
    - `model` string, required — The language model for the interactions.
    - `requester_id` string, required — The identifier for the entity making the interactions.
    - `provider` string — The provider of the language model.
  - `input` InteractionsInput
    - `messages` InteractionsTextContent[] — The list of messages as input to a language model.
      - `role` string — The role of the message sender (e.g., user, assistant, system).
      - `content` string, required — The textual content of the message.
  - `output` InteractionsOutput
    - `messages` InteractionsTextContent[] — The list of messages as output from a language model.
      - `role` string — The role of the message sender (e.g., user, assistant, system).
      - `content` string, required — The textual content of the message.

## Response `200`

Successful Response

- EnrichedResponse
  - `metadata` EnrichedMetadata, required
    - `event_id` string, uuid — The unique identifier for the analysis event.
    - `analyzed_at` string, date-time — The timestamp when the analysis was performed.
    - `provider` string, required — The provider of the language model from the request.
    - `model` string, required — The language model from the request.
    - `requester_id` string, required — The identifier for the entity from the request.
    - `project` Project, required
      - `project_id` string, uuid — The unique identifier for the Project.
      - `project_alias` string — A custom alias for the Project.
      - `ruleset_id` string, uuid — The unique identifier for the Ruleset associated with the Project.
    - `processing_time_ms` number, required — The total time taken to perform the analysis.
  - `analysis` EnrichedAnalysis[], required
    - `name` string, required — The name of the analysis performed.
    - `phase` string, required — The phase of the analysis (i.e. input or output).
    - `version` string, required — The version of the analysis performed.
    - `detected` boolean, required — Indicates the analysis resulted in a detection.
    - `configuration` EnrichedAnalysisConfiguration, required — The configuration settings used for the analyzer.
    - `findings` EnrichedAnalysisFindings, required — The frameworks and associated findings for the analysis.
      - `frameworks` object, required — The taxonomies for the detections.
    - `processing_time_ms` number, required — The time taken to perform this specific analysis.
    - `id` string, required — The unique identifier for the analyzer.
  - `evaluation` EnrichedEvaluation — The evaluation of the analysis results.
    - `action` 'Allow' | 'Alert' | 'Redact' | 'Block', required — The action based on interaction analysis and configured tenant security rules.
    - `has_detections` boolean, required — Indicates if any detections were found during the analysis.
    - `threat_level` 'None' | 'Low' | 'Medium' | 'High' | 'Critical', required — The threat level based on interaction analysis and configured tenant security rules.
  - `analyzed_data` EnrichedAnalyzedData, required — The language model input and/or output that was analyzed.
    - `input` InteractionsInput, required
      - `messages` InteractionsTextContent[] — The list of messages as input to a language model.
        - `role` string — The role of the message sender (e.g., user, assistant, system).
        - `content` string, required — The textual content of the message.
    - `output` InteractionsOutput
      - `messages` InteractionsTextContent[] — The list of messages as output from a language model.
        - `role` string — The role of the message sender (e.g., user, assistant, system).
        - `content` string, required — The textual content of the message.
  - `modified_data` EnrichedModifiedData, required — The potentially modified language model input and output after applying any redactions or modifications based on the analysis.
    - `input` InteractionsInput, required
      - `messages` InteractionsTextContent[] — The list of messages as input to a language model.
        - `role` string — The role of the message sender (e.g., user, assistant, system).
        - `content` string, required — The textual content of the message.
    - `output` InteractionsOutput, required
      - `messages` InteractionsTextContent[] — The list of messages as output from a language model.
        - `role` string — The role of the message sender (e.g., user, assistant, system).
        - `content` string, required — The textual content of the message.

## Other responses

- `422` — Validation Error

---

[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/d8c55b669109/schema)
