All Products
Search
Document Center

API Gateway:AiSecurityGuardConfig

Last Updated:Apr 08, 2026

Parameter

Type

Description

Example

object

Configuration settings for the AI Security Guard.

serviceAddress

string

The service address of the security check endpoint.

checkRequest

boolean

Specifies whether to check the content of incoming requests.

checkResponse

boolean

Specifies whether to check the content of outgoing responses.

checkRequestImage

boolean

Specifies whether to check incoming requests for image content. Requires checkRequest to be true.

checkResponseImage

boolean

Specifies whether to check outgoing responses for image content. Requires checkResponse to be true.

requestCheckService

string

The identifier of the request check service for text content.

responseCheckService

string

The identifier of the response check service for text content.

requestImageCheckService

string

The identifier of the request check service for image content.

responseImageCheckService

string

The identifier of the response check service for image content.

riskAlertLevel

string

The risk alert level. The service triggers an alert when a detected risk meets or exceeds this level.

bufferLimit

integer

The buffer limit in bytes for streaming content checks. The service buffers content up to this limit before sending it for analysis.

pluginStatus AiPluginStatus
Controls whether the AI Security Guard plugin is enabled or disabled.

consumerRiskLevel

array

Specifies customized risk thresholds for different consumers.

object

A configuration object that specifies the risk level for a specific consumer.

name

string

The identifier of the consumer.

matchType

string

The match type for identifying the consumer. For example: header or query.

type

string

The type of risk to configure. For example: profanity or spam.

level

string

The risk level to apply to the specified consumer and risk type. For example: low, medium, or high.

consumerRequestCheckService

array

Specifies consumer-specific configurations for the request check service.

object

A configuration object that specifies the request check service for a specific consumer.

name

string

The identifier of the consumer.

requestCheckService

string

The identifier of the request check service for text content for this consumer.

requestImageCheckService

string

The identifier of the request check service for image content for this consumer.

matchType

string

The match type for identifying the consumer. For example: header or query.

modalityType

string

The modality type for this rule. For example: text or image.

consumerResponseCheckService

array

Specifies consumer-specific configurations for the response check service.

object

A configuration object that specifies the response check service for a specific consumer.

name

string

The identifier of the consumer.

responseCheckService

string

The identifier of the response check service for text content for this consumer.

responseImageCheckService

string

The identifier of the response check service for image content for this consumer.

matchType

string

The match type for identifying the consumer. For example: header or query.

modalityType

string

The modality type for this rule. For example: text or image.

riskConfig

array

Specifies general risk configurations.

object

A configuration object for a specific risk type.

type

string

The type of risk to configure. For example: profanity or spam.

level

string

The default risk level for this risk type. For example: low, medium, or high.

consumerRules

object

Contains rules that override the default settings for specific consumers.

pattern

string

The pattern for matching a consumer. This can be a regular expression.

matchType

string

The location in the request to search for the pattern. For example: header or query.