All Products
Search
Document Center

:Model Studio Integration Guide

Last Updated:Dec 02, 2026

This topic describes how to integrate AI Guardrails with the Alibaba Cloud Model Studio platform to add security protection for the inputs and outputs of Model Studio models.

Important

The Model Studio platform now supports enabling AI Guardrails through a workspace. New users should integrate in this mode. The original Header mode no longer accepts new integrations, and existing users are not affected. To switch to the workspace mode, contact your business manager.

Prerequisites

Before you start the configuration, make sure that you have completed the following preparations:

  1. Activate AI Guardrails: Go to the AI Guardrails purchase page, create the service-linked role, and click Buy Now to complete the activation.

  2. Complete SLR authorization: Log on to the Alibaba Cloud Model Studio console. In the left-side navigation pane, go to Security Management and follow the on-screen instructions to complete the authorization, allowing Model Studio to access the AI Guardrails service.

Note

When you authorize the activation of AI Guardrails, you must confirm the Commitment Letter for Self-Built Security Mechanisms. Read and agree to it before you continue.

Billing

AI Guardrails is a paid service that uses the pay-as-you-go billing method. Fees are incurred only when the service is actually called; no fees are incurred if it is not called. For detailed billing rules, see Billing overview.

Integration guide

AI Guardrails supports configuring different security policies at the granularity of Model Studio workspaces.

Step 1: Enable AI Guardrails in a Model Studio workspace

  1. Log on to the Alibaba Cloud Model Studio console. Make sure that the region is set to China (Beijing), and go to the target workspace.

  2. In the workspace settings, find the AI Guardrails option.

  3. Enable Input Detection and Output Detection as needed. The two can be enabled independently and do not affect each other.

Note

The Model Studio platform enables AI Guardrails at the workspace level. After it is enabled, all model calls in the workspace are automatically moderated and use the default protection configuration. The Model Studio platform currently supports only the China (Beijing) region.

Step 2 (optional): Add a custom configuration

AI Guardrails provides a default configuration (configuration ID: bailian_default) for all workspaces on the Model Studio platform. Workspaces that are not associated with a custom configuration use this default configuration. To configure a different security policy for a specific workspace, add a custom configuration and associate it with the workspace.

Create a configuration

  1. Log on to the AI Guardrails console. Make sure that the region at the top is switched to China (Shanghai). In the left-side navigation pane, choose Provisioning and switch to the Model Studio page.

  2. On the page, click Add Configuration.

  3. In the Create Configuration dialog box that appears, enter the following information:

    Configuration item

    Description

    Configuration Name

    A custom configuration name that helps identify its purpose.

    Model Studio Workspace

    Select the Model Studio workspace (Workspace ID) to associate.

    Detection Request - Mapped Service

    Select the Service used for input moderation (for example, query_security_check_pro). You can click “+ Add Modality” to add multimodal mappings.

    Detection Output - Mapped Service

    Select the Service used for output moderation (for example, response_security_check_pro). You can click “+ Add Modality” to add multimodal mappings.

  4. Click Save.

Note
  1. A workspace can be associated with only one custom configuration.

  2. A custom configuration takes precedence over the default configuration. After a workspace is associated with a custom configuration, when AI Guardrails is called through Model Studio, the corresponding parameters are passed to automatically match that configuration. If no custom configuration is associated, the default configuration (bailian_default) is used.

  3. The protection policy of each Service (risk label switches, detection dimensions, and so on) can be modified on the Protection Config page of the AI Guardrails console. The operation path remains unchanged.

  4. The China (Beijing) region of the Model Studio platform corresponds to the China (Shanghai) region configuration of AI Guardrails. Other regions are not supported yet.

Manage existing configurations

On the Provisioning page of the AI Guardrails console, you can view the list of integrated products and configurations. Click Edit for a configuration to modify its associated workspace and Service mappings.

Edit protection configurations

Except for some red-line control labels, all other risk labels can be switched on or off in the console. Take “Model Studio Input Content Guardrails” (query_security_check_pro) as an example:

  1. Log on to the AI Guardrails console. In the left-side navigation pane, choose Protection Config > Model Protection.

  2. Locate the target Service. In the Operation column, click Configure.

  3. Select the target Protection Dimension, click Configuration Management, and select the detection type to adjust on the configuration management page.

  4. Click Edit to enter edit mode, modify the Detection Status of the target sub-scenario configuration, and click Save after the adjustment.

Note

The configuration takes effect about 2 to 5 minutes after the adjustment.