When you use an API to call Alibaba Cloud Model Studio applications, such as Agents and Workflows, you must provide credentials to specify the target application and its workspace:
If the application is in the Default workspace, provide only the Application ID.
If the application is in a Sub-workspace, provide both the Application ID and the Workspace ID.
This topic describes how to quickly obtain these credentials from the console. For more information about workspaces, see Workspace permission management.
You can get the Application ID and Workspace ID only from the console, not using an API or the CLI.
Get an Application ID
When you call any application's API, you must provide its unique Application ID.
Go to the My Applications page.
In the application list, find the target application and copy its
Application ID.

Get a Workspace ID
A Workspace ID is the unique identifier for a workspace. You only need to include the Workspace ID in an API request when calling an application that is in a Sub-workspace.
Get the ID of the current workspace
Quickly find the ID of the workspace that you are currently in.
Go to the console homepage (Singapore | Beijing | Virginia) page.
Click the
icon in the lower-left corner of the page, and then click Workspace Details.In the dialog box that appears, view and copy the Workspace ID.
By default, a RAM user can view only the IDs of workspaces that they have joined.

Get all workspace IDs
Use this method to query or manage all workspaces under an Alibaba Cloud account. Only a super administrator can perform this operation.
Log on to the Model Studio console with an Alibaba Cloud account or an authorized RAM user.
Click the
icon in the upper-right corner to go to the Workspace Management (Singapore | Beijing | Virginia) page.In the Workspace ID column, view and copy the ID of the required workspace.
This operation requires an Alibaba Cloud account or a RAM user with the AliyunBailianFullAccess or AliyunBailianControlFullAccess permission. If you do not have the required permissions, you will receive an "insufficient permissions" error. For instructions, see Management permissions.
What to do next
After you get the credentials, see DashScope API reference to build and send API requests.
FAQ
Q: Why do I receive an error when accessing the Workspaces page as a RAM user?
A: To access this page, the RAM user must be assigned the role of super administrator.