Authentication
Updated at:
Get and use an API Key for the Managed Agents API.
The Managed Agents API uses API Key authentication. All requests carry the API Key in the HTTP header, and a single key grants access to all resources within its workspace:
Authorization: Bearer <your-api-key>
Get an API Key
- Open the Bailian console, sign in with your Alibaba Cloud account, and activate Bailian.
- Create and copy an API Key on the API Key page.
WarningAPI Keys carry account-level permissions. Keep them secure and never share them publicly or commit them to a code repository.
Usage
Set the API Key as an environment variable (for example, DASHSCOPE_API_KEY), and include the Authorization header in every request:
curl "https://{workspace_id}.cn-beijing.maas.aliyuncs.com/api/v1/agentstudio/agents" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY"
Permissions
- Alibaba Cloud account: can call all endpoints directly.
- RAM users: need the corresponding permissions granted first.
- The permission scope of an API Key is configured in the console.
ImportantOnce configured, start with Create Agent.
Is this page helpful?