Skip to main content

AILabTools API - Querying credits - API

Request

  • URL: https://www.ailabapi.com/api/common/query-credits
  • Method: GET
FieldRequiredTypeDescription
ailabapi-api-keyYESstringApplication API KEY. Get API KEY

Response

Processing Flow
  1. Handle Public Parameters:

    First, parse and validate the Public Parameters, checking the status code or response message to ensure the request is successful and no errors are present.

  2. Handle Business Parameters:

    If the public parameters are valid and no exceptions are found, proceed to process the business logic in the Business Parameters.

Public Parameters

Viewing Public Parameters and Error Codes

Business Parameters

FieldTypeScopeDescription
dataarray
+unique_signstringScopeUnique identification. More Details
+namestringName.
+balancefloatCredit Balance.
+totalfloatTotal Credits.
+last_recharge_balancefloatBalance after last purchase.
+balance_warningfloatCredit Balance Early Warning Value.
+first_buy_timeintegerTime of first purchase.
+last_update_timeintegerLast update time.

unique_sign

NameUnique identification
Universal credits (all APIs supported)common

Example

{
"error_code": 0,
"error_code_str": "",
"error_msg": "",
"error_detail": {
"status_code": 200,
"code": "",
"code_message": "",
"message": ""
},
"data": [
{
"unique_sign": "",
"name": "",
"balance": 0,
"total": 0,
"last_recharge_balance": 0,
"balance_warning": 0,
"first_buy_time": 0,
"last_update_time": 0
}
]
}

Code example