The Kling 3.0 series models API is now fully available
Learn More

Account Information Inquiry


Query Resource Package List and Remaining Quantity under the Account

GET/account/costs
curl --request GET \
  --url 'https://api-singapore.klingai.com/account/costs?start_time=1726124664368&end_time=1727366400000' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json'
200
{
  "code": 0, // Error codes; specific definitions see Error codes
  "message": "string", // Error information
  "request_id": "string", // Request ID, generated by the system, for tracking and troubleshooting
  "data": {
    "code": 0, // Error codes; specific definitions see Error codes
    "msg": "string", // Error information
    "resource_pack_subscribe_infos": [ // Resource package list
      {
        "resource_pack_name": "Video Generation - 10,000 entries", // Resource package name
        "resource_pack_id": "509f3fd3d4ab4a3f9eec5db27aa44f27", // Resource package ID
        "resource_pack_type": "decreasing_total", // Resource package type; "decreasing_total" = decreasing total, "constant_period" = constant periodicity
        "total_quantity": 200.0, // Total quantity
        "remaining_quantity": 118.0, // Remaining quantity (Please note: remaining quantity statistics have a 12h delay)
        "purchase_time": 1726124664368, // Purchase time, Unix timestamp in ms
        "effective_time": 1726124664368, // Effective time, Unix timestamp in ms
        "invalid_time": 1727366400000, // Expiration time, Unix timestamp in ms
        "status": "expired" // Resource package status: "toBeOnline" = Pending effectiveness, "online" = In effect, "expired" = Expired, "runOut" = Used up
      }
    ]
  }
}

Note: This API is free to call and allows you to query the list and balance of resource packages under your account. Please note to control the request rate (QPS<=1)

Request Header

Content-TypestringRequiredDefault to application/json

Data Exchange Format

AuthorizationstringRequired

Authentication information, refer to API authentication

Query Parameters

start_timeintRequired

Query start time, Unix timestamp, unit: ms

end_timeintRequired

Query end time, Unix timestamp, unit: ms

resource_pack_namestringOptional

Resource package name, used to precisely specify a resource package to query

curl --request GET \
  --url 'https://api-singapore.klingai.com/account/costs?start_time=1726124664368&end_time=1727366400000' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json'
200
{
  "code": 0, // Error codes; specific definitions see Error codes
  "message": "string", // Error information
  "request_id": "string", // Request ID, generated by the system, for tracking and troubleshooting
  "data": {
    "code": 0, // Error codes; specific definitions see Error codes
    "msg": "string", // Error information
    "resource_pack_subscribe_infos": [ // Resource package list
      {
        "resource_pack_name": "Video Generation - 10,000 entries", // Resource package name
        "resource_pack_id": "509f3fd3d4ab4a3f9eec5db27aa44f27", // Resource package ID
        "resource_pack_type": "decreasing_total", // Resource package type; "decreasing_total" = decreasing total, "constant_period" = constant periodicity
        "total_quantity": 200.0, // Total quantity
        "remaining_quantity": 118.0, // Remaining quantity (Please note: remaining quantity statistics have a 12h delay)
        "purchase_time": 1726124664368, // Purchase time, Unix timestamp in ms
        "effective_time": 1726124664368, // Effective time, Unix timestamp in ms
        "invalid_time": 1727366400000, // Expiration time, Unix timestamp in ms
        "status": "expired" // Resource package status: "toBeOnline" = Pending effectiveness, "online" = In effect, "expired" = Expired, "runOut" = Used up
      }
    ]
  }
}