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:
Set the API Key as an environment variable (for example,
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.
Usage
Set the API Key as an environment variable (for example, DASHSCOPE_API_KEY), and include the Authorization header in every request:
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.