All Products
Search
Document Center

AI Guardrails:Provisioning

Last Updated:Dec 02, 2026

Provisioning integrates the detection capabilities of AI Guardrails into different model and service sources. This topic describes the applicable scenarios, configuration entries, and key points of the three access methods—Model Studio, AI Gateway, and Security Plugins—to help you choose the right method to complete provisioning.

On the Provisioning page of the AI Guardrails console, access sources are divided into three tabs: Model Studio, AI Gateway, and Security Plugins. All three methods invoke AI Guardrails detection capabilities in real time on the input and output of model calls, intercepting risks such as prompt injection, sensitive information leakage, and non-compliant content. They differ in the integration point and configuration granularity.

Access method overview

Access method

Applicable scenario

Configuration entry

Configuration granularity

Model Studio

You call models through the Alibaba Cloud Model Studio platform and want to add security protection to the input and output of a Model Studio workspace.

Enable detection in the Model Studio console and manage the configuration in the AI Guardrails console.

Per Model Studio workspace.

AI Gateway

You proxy multi-model traffic through AI Gateway, a sub-product of Alibaba Cloud API Gateway, and want unified protection without modifying your business architecture.

Create the configuration in the AI Guardrails console and associate it with an instance in the AI Gateway console.

Per gateway instance, with consumer-based matching supported.

Security Plugins

Integrate locally into Agent runtimes such as QwenWork, Qoder, QoderWork, and OpenClaw to protect user input and model output.

Obtain the installation guide in the AI Guardrails console and install the plugin in the runtime.

Per runtime instance.

Model Studio

The Model Studio method is for users who call models through the Alibaba Cloud Model Studio platform. Model Studio now supports enabling AI Guardrails by workspace. New users should integrate through this mode. The original Header mode no longer accepts new integrations, and existing users are not affected. After it is enabled, all model calls in the workspace are automatically submitted for moderation and use the default protection configuration. Input detection and output detection can be enabled independently without affecting each other.

  • Prerequisites: Activate AI Guardrails and create the service-linked role. Complete SLR authorization in the Model Studio console to allow Model Studio to access the AI Guardrails service.

  • Default configuration and custom configuration: AI Guardrails provides a default configuration for all Model Studio workspaces (configuration ID: bailian_default). To configure a different policy for a specific workspace, in the console under Provisioning, you can add a custom configuration on the Model Studio tab, associate the workspace, and map the input and output detection Services. A workspace can be associated with only one custom configuration, and the custom configuration takes precedence over the default configuration.

  • Region mapping: Model Studio currently supports only the China (Beijing) region, which corresponds to the China (Shanghai) region configuration of AI Guardrails.

  • Protection policy adjustment: The risk label switches, detection dimensions, and other settings of each Service can be modified in the console under Protection Config on the Model Protection page.

For the complete operations, see Model Studio integration guide.

AI Gateway

The AI Gateway method is for users who proxy model traffic through AI Gateway, a sub-product of Alibaba Cloud API Gateway. As an enterprise-grade AI traffic hub, AI Gateway provides unified multi-model proxying and manages MCP and Agents. Integrating AI Guardrails into AI Gateway automatically performs content security detection and risk interception on AI requests and responses passing through the gateway, without modifying your business architecture. The overall process has two steps: first create a protection configuration in the AI Guardrails console, then associate the configuration with the target instance in the AI Gateway console. The configuration takes effect immediately after association.

  • Create a protection configuration: In the console under Provisioning, add a configuration on the AI Gateway tab. Select the model protocol (OpenAI, Anthropic, or Vertex AI), configure the modality, mapped Service, moderation mode, and slicing parameters for request detection (input) and output detection (response), and set the risk level and hit action by protection dimension. Saving the configuration alone does not make it take effect; it takes effect only after the gateway successfully associates it.

  • Moderation mode: Output detection supports synchronous moderation and asynchronous moderation. Synchronous moderation moderates before returning, suitable for non-streaming scenarios with extremely high security requirements. Asynchronous moderation returns immediately and moderates in the background; upon a hit, it notifies the client to retract through a retraction event, suitable for streaming output and low-latency scenarios. In general, synchronous moderation is recommended for non-streaming output, and asynchronous moderation for streaming output.

  • Associate an instance: After completing SLR authorization in the AI Gateway console, associate the AI Guardrails configuration with the target gateway instance. The engine version of the gateway instance must be 2.1.26 or later. AI Gateway selects the nearest corresponding AI Guardrails region based on its own region. You can associate different AI Guardrails configurations by consumer (any, exact, regex, or prefix match).

For the complete operations, the asynchronous moderation retraction event format, and the latency comparison, see AI Gateway integration guide.

Security Plugins

The Security Plugins method is for users who integrate locally into an Agent runtime. Security plugins invoke AI Guardrails detection capabilities in real time on user input and model output in the Agent runtime, intercepting risks such as prompt injection, sensitive information leakage, and malicious files. They support runtimes such as QwenWork, Qoder, QoderWork, and OpenClaw. Agent Real-Time Protection can only be accessed through security plugins.

In the console under Provisioning, the Security Plugins tab provides installation and integration guides for the security plugin of each runtime. The installation process is broadly the same across runtimes: authorize the security plugin to call the AI Guardrails service, obtain the installation instructions, run the installation command, upload the installation package, and finally verify the installation result. After installation, you can modify the protection policy in the console. On the runtime side, both administrator and personal uninstall operations are supported.

For the specific installation and integration methods of each runtime, see the corresponding documents: QwenWork integration guide, Qoder integration guide, OpenClaw integration guide, AgentScope integration guide, and Dify platform integration tutorial.