Skip to content

Filter Models

Request and response bodies for the inbound and outbound filter endpoints.

InboundFilterRequest

Request body for the inbound content validation endpoint.

Field Type Required Description
content string No User input to validate.
config_id string No Firewall configuration UUID.
ip_address string No Ignored. MATVIS records the IP address of the connection instead.
tool_response ToolResponseInput No Tool response to scan before returning it to the LLM.
tool_config_id string No Tool-response scan configuration UUID.
session_id string No Beta. Chat session the call belongs to; see Sessions (beta).
session_end boolean No Beta. End the session once this call has succeeded.

OutboundFilterRequest

Request body for the outbound content validation endpoint.

Field Type Required Description
content string No AI-generated content to validate.
config_id string No Firewall configuration UUID.
ip_address string No Ignored. MATVIS records the IP address of the connection instead.
tool_call ToolCallInput No Tool call to scan before execution.
tool_config_id string No Tool-call scan configuration UUID.
session_id string No Beta. Chat session the call belongs to; see Sessions (beta).
session_end boolean No Beta. End the session once this call has succeeded.
stream boolean No Beta. Append content to the session's streamed reply.
stream_end boolean No Beta. Append content if given, then scan the rest of the streamed reply and end it.

InboundFilterResponse

Returned by the inbound endpoint. OutboundFilterResponse has the same shape.

Field Type Description
config_id string Firewall configuration UUID.
content string The content as sent. Beta, under a session on /outbound: the restored text this verdict covers, empty while a streamed reply is still being collected.
content_modified string \| null The rewritten content to forward when result.modified is true: the masked text on /inbound, the restored text under a session on /outbound. null otherwise.
filters object Per-filter results, keyed by filter name; each value is a FilterResponseDetails.
result FilterResponseResult Overall validation result.
session_id string Beta. The session the call belonged to, as sent; null without one.
timestamp string (date-time) RFC 3339 timestamp.

FilterResponseDetails

The result of a single filter within filters.

Field Type Description
valid boolean Whether this filter passed.
score number Filter score (higher = riskier).
severity_level integer This filter's severity level, 0 to 10. 0 means it reached no threshold.
monitoring_mode boolean true when this filter's configuration is in Monitoring (non-blocking) mode, so its detections are recorded but not enforced. Set whether or not the filter found anything.
details object \| null Filter-specific data. See below.

What details holds per filter:

  • Content: one entry per configured topic, each an object with its own score and severity level, for example "Fraud Schemes": { "score": 0.22, "severity_level": 0 }.
  • Language: { "label", "score" }, the detected language and its confidence.
  • PII: {} when nothing was found. When PII is found: one list of { "entity", "score" } matches per entity type, and severity_levels, the severity level per entity type. When the inbound configuration masks PII, also pseudonymized (the masked text) and mapping (each placeholder with its original value and entity_type).
  • PromptInjection: always null. A matched bypass tag shows in result.handling as bypassed.

FilterResponseResult

The overall outcome; check action to decide whether to forward the content.

Field Type Description
action string What to do: allow to forward the content, block to reject it. Already takes monitoring mode into account.
valid boolean false when a filter found something it would block. In monitoring mode valid is false while action is allow. PII that was masked does not make it false.
modified boolean true when the content was rewritten. Forward content_modified instead of content.
handling string[] How detections were handled. Can hold several values: pseudonymized (PII masked, inbound only), bypassed (prompt-injection bypass tag matched, inbound only), allowlisted (an allowlist entry matched). Empty when nothing was handled.
block_reason string \| null The filter the verdict is attributed to: Content, PromptInjection, PII, Language, Custom Regex, or ToolScan for a tool scan. null when valid is true.
source string \| null Which scan produced block_reason: chat for the content scan, tool for the tool-call or tool-response scan. null when valid is true.
block_message string \| null The message to show the user: the custom block message of your configuration, or the default one. null when valid is true.
severity number Score of the detection the verdict is attributed to.
severity_level integer Severity level of that detection, 0 to 10. 0 means nothing reached a threshold.
highest_severity_filter string \| null The filter with the most severe detection, whether or not it was enforced. Names a key in filters. null when no detection reached a severity level above 0.
monitoring_mode boolean true only when the reported detection was not enforced because its configuration is in Monitoring (non-blocking) mode. Each filter's own flag is filters.<name>.monitoring_mode.