Updated on 2025-11-20 GMT+08:00

Managing API Keys in ModelArts Studio (MaaS)

Operation Scenarios

When using MaaS, you often need to call model services via APIs for tasks such as data requests and model inference. However, improper management of API keys (loss or leakage) can lead to unauthorized access risks, thereby compromising service security and stability. To ensure the secure management of API keys and prevent unauthorized access, the MaaS platform offers API key management, enabling you to create, edit, and manage permissions for API keys. This ensures that only users with valid API keys can successfully call model services, and only those with appropriate permissions can manage API Keys, while also reducing the risk of prolonged key exposure. This section explains how to create, edit, and delete API keys.

Constraints

  • Each account can have up to 30 API keys. If you exceed this limit, delete old keys before adding new ones.
  • After you create an API key, you must save it right away. The system does not store the key as plain text.
  • After you delete an API key, it becomes invalid right away.

Creating an API Key

You can create up to 30 keys. Each key is displayed only once after creation. Keep it secure. If the key is lost, it cannot be retrieved. In this case, create a new API key.

  1. Log in to the ModelArts Studio (MaaS) console and select the target region on the top navigation bar.
  2. In the navigation pane, choose API Key Management.
  3. On the API Key Management page, click Create API Key, enter the tag and description, and click OK.

    The tag and description cannot be modified after the key is created.

    Table 1 Parameters

    Parameter

    Description

    Tag

    Tag of the API key. The tag must be unique. The tag can contain 1 to 100 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.

    Description

    Description of the custom API key. The value can contain 1 to 100 characters.

  4. In the displayed dialog box, copy the key and save it to a secure location, and click Saved. Confirm and Close.
    Figure 1 Saving an API key

    After you close the dialog box, the key cannot be viewed again. Once you create the API key, it appears on the API Key Management page. The system shows only the first and last four characters by default.

    Figure 2 API key

Editing an API Key

After an API key is created, you can only modify the description and permissions.

  1. Log in to the ModelArts Studio (MaaS) console and select the target region on the top navigation bar.
  2. In the navigation pane, choose API Key Management.
  3. In the Operation column of the target API key, click Edit.
  4. In the displayed dialog box, modify the description and permissions as required, and click OK.

    For details, see Table 1.

Deleting an API Key

If you reach the API key limit or if a key is leaked or lost, delete unused API keys. Deleting the API key will permanently remove it and prevent its use or retrieval.

  1. Log in to the ModelArts Studio (MaaS) console and select the target region on the top navigation bar.
  2. In the navigation pane, choose API Key Management.
  3. Click Delete on the right of the target API key.
  4. In the Delete API Key dialog box, click OK.

FAQs

  1. How long does it take for an API key to become valid after it is created?

    An API key becomes valid a few minutes after creation.

  2. Can I use an API key across regions?

    API keys work only in their specific region. For example, an API key created in the CN-Hong Kong region can only be used in this region.

Helpful Links