To call an Alibaba Cloud Model Studio application, such as Agent and Workflow, through the API, include the application ID in your request. If the application is in a Sub-workspace, also include the workspace ID.
| Workspace type | Required credentials |
|---|---|
| Default workspace | Application ID |
| Sub-workspace | Application ID + Workspace ID |
You can get the application ID and workspace ID only from the console, not through an API or the CLI.
Prerequisites
An Alibaba Cloud account with access to the Model Studio console
Get an application ID
Go to the My Applications page.
Find the target application and copy its Application ID.

If your application is in the Default workspace, you have everything you need. Skip to What to do next.
Get a workspace ID
A workspace ID is required only when calling an application in a Sub-workspace. Choose one of the following methods based on your role.
Current workspace
To find the ID of the workspace you are working in:
Go to the console homepage (Singapore | Beijing | Virginia).
Click the
icon in the lower-left corner, then click Workspace Details.Copy the Workspace ID from the dialog box.
By default, a RAM user can only view IDs of workspaces they have joined.

All workspaces
To query or manage all workspaces under an Alibaba Cloud account, use the Workspace Management page. Only a super administrator can access this page.
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 open the Workspace Management page (Singapore | Beijing | Virginia).In the Workspace ID column, copy the ID of the target workspace.
This operation requires an Alibaba Cloud account or a RAM user with the AliyunBailianFullAccess or AliyunBailianControlFullAccess permission. Without these permissions, you will receive an "insufficient permissions" error. For details, see Management permissions.
What to do next
After you get the application ID (and workspace ID, if applicable), see DashScope API reference to build and send API requests. For more information about workspaces and permissions, see Workspace permission management.
FAQ
Q: Why do I get an error when accessing the Workspace Management page as a RAM user?
A: The RAM user must have the super administrator role. See Workspace permission management for setup instructions.
Q: Should I hardcode the application ID and workspace ID in my code?
A: No. Store credentials in environment variables or a secrets manager. This prevents accidental exposure in version control and simplifies credential rotation across environments.