All Products
Search
Document Center

Alibaba Cloud Model Studio:Get an API key

Last Updated:Mar 15, 2026

Create an API key to call models and applications.

Create an API key

Important

Use your Alibaba Cloud account or a RAM user with administrator or API-Key page permissions.

  1. Open the API Key (Singapore), API Key (US (Virginia)), or API Key (China (Beijing) page and click Create API Key.

  2. Configure the following settings and click OK:

    • Owner Account: Select the Alibaba Cloud account (digit-only ID in the Account column).

    • Workspace: Select the default workspace.

  3. Click image next to the API key to copy it.

    Root accounts can view all API keys. RAM users can only view keys they created.

    2026-02-11_11-56-27

When should you choose a different account or workspace?

For team collaboration or cost allocation:

  • Owner Account: To bind a key to a specific member for easier permission management during personnel changes, select the corresponding RAM user. If that user is removed from the workspace, the key becomes invalid and loses calling permissions.

  • Workspace: Workspaces isolate resources and permissions for different projects or teams. To control which models certain users can call or split billing for model usage, create a sub-workspace and select it from the list.

For more information, see Permissions and Bill query and cost management.

Use API keys

Note

Coding Plan users: use your exclusive API key (format: sk-sp-xxxxx), see Get your plan-specific API key and base URL. Do not use the general API key (format: sk-xxxxx) from this page.

Never share your API key publicly - unauthorized use can cause security breaches or financial loss.

Permissions

An API key’s permissions are fully determined by its workspace. All API keys in the same workspace have identical permissions. You do not need separate keys for different model types (text, image, speech).

  • Default workspace keys: Can call all models and applications in the default workspace.

  • Sub-workspace keys: Can call models that the sub-workspace has been granted access to, along with applications within that sub-workspace.

Validity

API keys remain valid permanently unless deleted.

To grant temporary access to third-party applications or control high-risk operations (accessing or deleting sensitive data), generate a temporary API key (valid for 60 seconds). This avoids exposing long-term keys and reduces leakage risk.

FAQ

Q: How many API keys can I create under one Alibaba Cloud account?

A: Each account supports up to 10 workspaces (including default), and each workspace supports up to 20 API keys.

Q: If a RAM user is deleted, are the API keys they created still usable?

A: After you disable or delete a RAM user, all keys created by that user become invalid and cannot call models.