Updated on 2025-08-04 GMT+08:00

Managing API Keys in ModelArts Studio (MaaS)

To call a model service in MaaS, enter an API key for secure, authorized access. This chapter describes how to create and delete an API key.

Description

When you use a model service deployed in MaaS for tasks like data requests and model inference, the system checks your API key to verify your identity and access permissions. Only users with valid API keys can access model services, preventing unauthorized use.

  • First access: Create an API key to authenticate your identity when you call the model API for the first time.
  • Key loss or leakage: If your API key is lost or leaked, create a new key to replace it for security.
  • Periodic key rotation: Rotate the key regularly according to the security policy to lower the risk of long-term exposure.

Notes and 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.

Prerequisites

  • You have the permission to manage API keys.
  • You have learned the scenarios and permission requirements for the target model service.

Creating an API Key

You can create a 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 ModelArts Studio (MaaS) console and select the target region on the top navigation bar.
  2. In the navigation pane, choose API Keys.
  3. On the API Keys 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 Your Key dialog box, copy the key and store it securely.
  5. After the key is saved, click Close.

    After you click Close, the key cannot be viewed again. Once you create the API key, it appears on the API Keys page.

    Figure 1 API key

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 console and select the target region on the top navigation bar.
  2. In the navigation pane, choose API Keys.
  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 South-Hong Kong region can only be used in this region.