All Products
Search
Document Center

AI Guardrails:Preparations

Last Updated:Mar 31, 2026

Before you call the AI Guardrails API, complete these three steps:

  1. Activate the AI Guardrails service — skip if already activated

  2. Create an AccessKey pair — required to authenticate API calls

  3. Set up a RAM user — recommended for teams and production environments; skip if you are using your root account AccessKey for testing

Activate the service

  1. If you do not have an Alibaba Cloud account, create one on the Alibaba Cloud website.

  2. Go to the AI Guardrails product page and activate the service.

Create an AccessKey pair

AI Guardrails API calls require an AccessKey pair for authentication. An AccessKey pair consists of an AccessKey ID and an AccessKey secret, and grants full access to your Alibaba Cloud account.

Manage your AccessKey pairs on the AccessKey Management page.

Important

An AccessKey pair has full permissions on your account. Keep it secure and rotate it periodically. For production environments, use a RAM user's AccessKey pair instead of the root account's — see Set up a RAM user.

Set up a RAM user

Resource Access Management (RAM) lets you create users with scoped permissions. This is the recommended approach for teams and production workloads, where using the root account AccessKey pair is a security risk.

To set up a RAM user for AI Guardrails:

  1. Log on to the RAM console, create a RAM user, and generate an AccessKey ID and AccessKey secret for that user. For details, see Create a RAM user. Keep the AccessKey ID and AccessKey secret secure after they are created. You need them to call API operations and use software development kits (SDKs).

  2. Grant the AliyunYundunGreenWebFullAccess system policy to the RAM user. For details, see Manage RAM user permissions.

Use the RAM user's AccessKey ID and AccessKey secret to call AI Guardrails API operations and to configure SDKs.