tencent cloud

APIs

ModifyTokenPlanApiKey

Download
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-08-25 10:02:44

1. API Description

Domain name for API request: tokenhub.intl.tencentcloudapi.com.

Modify the Token Plan APIKey configuration (field that the gateway focuses on).

After modification, automatically notify the gateway to update the cache and sync the limit center.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ModifyTokenPlanApiKey.
Version Yes String Common Params. The value used for this API: 2026-03-22.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
ApiKeyId Yes String API Key ID.
AllowedModels.N No Array of String Available model list. If this parameter is not specified, no modification is made.

- If the package type is enterprise professional:
1) Input "all": use all models supported by the package
2) Import Model ID: specify a specific model. "all" and a specific Model ID cannot be specified at the same time.

-If the package type is enterprise lightweight edition, do not pass in this parameter.
ExclusiveQuota No Integer Dedicated limit. If this parameter is not specified, no modification will be made. Unit:

-Package type: professional. Measurement unit: point.
- Package type is lite package, and the measurement unit is token.
TotalQuota No Integer Total credit limit. -1 means unlimited. It must be -1 or greater than or equal to the current ExclusiveQuota of the API Key. If not passed, no modification is made. Measurement units are as follows:
-Package type: professional. Measurement unit: point.
- Package type is lite package, and the measurement unit is token.
UseStatus No String Whether to enable the API Key. Values: enable (enable), disable (disable). If not passed, no modification is made.
TPM No Integer TPM (Tokens Per Minute) limit. If not passed, no modification will be made. Must be >= 0 and <= the package TPM.

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 ModifyTokenPlanApiKey

Input Example

POST / HTTP/1.1
Host: tokenhub.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyTokenPlanApiKey
<Common request parameters>

{
    "ApiKeyId": "ak-tp-20260412-72dddac0126f0eadf4670f6ce63b3db1",
    "AllowedModels": [
        "glm-5"
    ]
}

Output Example

{
    "Response": {
        "RequestId": "9eae973f-53e4-4713-bdd9-97730349636d"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError.InternalError InternalError.InternalError
InvalidParameter.InvalidParameter InvalidParameter.InvalidParameter
MissingParameter.MissingParameter MissingParameter.MissingParameter
ResourceNotFound The resource does not exist.
UnauthorizedOperation.UnauthorizedOperation UnauthorizedOperation.UnauthorizedOperation

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan