API Reference
Get Credit Balance

Get Usage of API Credits

Action GetCreditBalance

Introduction

This interface is used to query the usage of API credits of the current account.

Request

Parameter NameTypeDescriptionRequired
ActionStringThe corresponding API command name, which is GetCreditBalance for this API
PublicKeyStringUser's public key, which can be obtained from the User Center (opens in a new tab)
SignatureStringUser's signature generated based on the public key and API command, see Signature
request_uuidStringRequest UUID, randomly generated using the UUID generation method

Request Example

{
    "Action":    "GetCreditBalance",
    "PublicKey": "ALLak9M4cNdHXKOJAJJ4k8Hh1hZS2EgJF1D0FlPwfl",
    "request_uuid":"b91fcfbe-bb35-47ce-a168-bd6252c75270",
    "Signature": "0131f4e4296f3ca8e1220b47247e83a4315ea8e1"
}

Response

Field NameTypeDescriptionRequired
RetCodeIntReturn status code. 0 indicates a successful response, non-zero indicates a failure.
ActionStringOperation command name.
MessageStringError message returned. Provides detailed description when RetCode is non-zero.
request_uuidStringReturns the requested uuid
TotalCreditsIntTotal number of account API points
UsedCreditsIntNumber of account API points used
ExpireTimestampIntAPI Points Expiration Time

Response Example

{
	"Action": "GetCreditBalance",
	"RetCode": 0,
	"Message": "",
	"request_uuid": "18a62d99-cb9b-4fde-a6a3-d14180a13f2a",
	"TotalCredits": 804000,
	"UsedCredits": 4641,
	"ExpireTimestamp": 1727331226
}