tencent cloud

API Key Management

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-04-22 10:56:25
API Key is the identity credential for calling the TokenHub service of the large model service platform, with long-term validity. You can create, edit, enable and disable, and delete API Keys on the API Key Management page, and set fine-grained access scopes for each API Key.
Note:
API Key is valid long-term. Please include it in the request header when requests are made, store it securely, and update it regularly. Do not share or leak it in public environments to prevent unauthorized access that may cause security risks or financial losses.

API Key Usage Limitation

The default creation limit for API Keys per single primary account is 50 items. If you have additional usage requirements, please submit a ticket to apply.

API Key list

Field
Description
Name
Custom API Key name.
Description
Custom API Key description for easy identification of its purpose.
Key
Masked display (first 5 characters + *** + last 4 characters), supports one-click copy of the full API Key.
Status
Enable/Disable.
You can toggle the enable/disable status of the API Key using the status switch. When the API Key is disabled, all API requests using the disabled API Key will be rejected.
Accessible Range
Select All (can access all models and services).
Defined Range (can only access selected models/services).
Creation Time
API Key initial creation time.
Actions
Edit: Modify the access scope of the API Key and associated models/services.
Delete: Permanently delete the API Key, which requires secondary confirmation. After deletion, all requests using this API Key will fail immediately.

Create a Key

1. Go to the API Key Management page.
2. After a region is selected at the top of the page, click Create a Key.
3. Configure in the Create a Key dialog:
Key Name: For example, "Production Environment-Text Service", "Test Key".
Description (Optional): Set a description for the API Key to facilitate identifying its purpose and distinguishing the purpose of API Keys.
Accessible Range:
Select All: Can access all models and inference services under your account.
Defined Range: You can select accessible models and inference services on the left and right sides of the Access Scope area to implement access scope control.

4. Click Confirm to complete the creation.
After creation is completed, you must copy and securely store the API Key, as it will be used in subsequent API call processes.
Note:
The API Key name and API Key value cannot be modified after creation.

Edit API Key

1. Go to the API Key Management page.
2. Select the region to which the target API Key belongs at the top of the page to locate the API Key.
3. In the Actions column to the right of the API Key, click Edit.
4. You can modify the API Key description or access scope in the Edit API Key dialog box.
Note:
After the new specified scope is switched to, the previously selected access scope will become void, and the scope after this switch will take precedence.
5. Click Confirm to save the changes.

Delete API Key

Note:
Once an API Key is deleted, it cannot be recovered. All service calls using this API Key will immediately become invalid. Deletion will trigger account identity verification. Please be aware.
1. Go to the API Key Management page.
2. Select the region to which the target API Key belongs at the top of the page to locate the API Key.
3. In the Actions column to the right of the API Key, click Delete.
4. In the Confirm deleting API Key dialog box, after verifying the deletion information is correct, click Confirmed to complete the deletion.


Usage Recommendations

Recommendation
Description
Assign API Keys by Purpose
Create separate API Keys for different applications or environments (development/test/production).
Principle of Least Privilege
Use specified scope to restrict API Key to only access the required models and services.
Rotate API Keys promptly
Regularly rotate API Keys to reduce the risk of leakage.
Disable unused API Keys
API Keys no longer in use should be promptly disabled or deleted.
Securely store API Keys
Save the API Key to a secure location immediately after creation.


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan