All Products
Search
Document Center

Elastic Desktop Service:DescribeCreditUsageInfo

Last Updated:Sep 02, 2026

Queries credit usage details by a specified dimension such as user, credit package, or agent.

Operation description

Request description

This API queries credit usage details based on the dimension specified by UsageType (User / CreditPackage / Agent). The response includes the total, remaining, and used credits of the current credit package, hourly consumption samples, alert thresholds, period quotas, and other information.

  • User: User dimension. Returns the aggregated usage and remaining credits of all active credit packages for the current user.

  • CreditPackage: Credit package dimension. Returns the total, remaining, and consumption samples of a specified credit package instance.

  • Agent: Agent dimension. Returns the cumulative usage, current period usage, quota, alert, and other information of a specified agent.

Note:

  • The InstanceIds parameter can be omitted when UsageType=User. Pass a credit package instance ID when UsageType=CreditPackage, or pass an AgentId when UsageType=Agent.

  • Anonymous requests support the FillInstance parameter. When InstanceIds is not explicitly specified and FillInstance=true, the server automatically populates the bound JVS_COPILOT AgentId based on the current logon wyId.

  • Time window constants: The dayUsedCredit statistics window is now - ONE_DAY_MILLIS, and the weekUsedCredit statistics window is now - ONE_WEEK_MILLIS.

  • The currentCreditConsumeList consumption samples are aggregated by hour and may have an asynchronous synchronization delay of up to 5 minutes.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecd:DescribeCreditUsageInfo

get

*All Resource

*

None None

Request syntax

GET  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

BizType

string

No

The business type.

BUSINESS

UsageType

string

No

The usage type (UsageType). Valid values:

  • User: Returns the usage, remaining credits, and consumption trends of the active credit packages for the current user.

  • CreditPackage: Requires a CreditPackageId. Returns the total and remaining credits of the specified credit package.

  • Agent: Requires an AgentId. Returns the cumulative credit usage, cumulative allocated quota, and the percentages of both.

User

InstanceIds

array

No

The scenarios for the operator. Valid values:

  • If not specified or NaturalMonthlyOwn: natural monthly exclusive.

  • JzYearlyShare: Jiaozi yearly shared.

  • JzYearlyOwn: Jiaozi yearly exclusive.

JzYearlyShare

string

No

The instance ID.

cp-0bszoespx7o1ehjxs

No

The JSON string of the instance ID list. This parameter can be omitted when UsageType=User. Pass a credit package instance ID when UsageType=CreditPackage, or pass an AgentId when UsageType=Agent.

Response elements

Element

Type

Description

Example

object

The return type: ListResult<CreditUsageInfoModel>.

RequestId

string

The request ID.

68BD3312-53D8-123E-BB32-1A9F25E07A03

UsageInfoList

array<object>

The array of business data.

array<object>

The array of business data.

UsageInfoKey

string

The usage primary key. When UsageType=User, this is the aliUid. When UsageType=CreditPackage, this is the credit package instance ID. When UsageType=Agent, this is the AgentId.

agent-abc

UsageInfo

object

The usage data details.

DayUsedCredit

integer

The credit usage in the last 1 day.

Credits consumed in the last day

WeekUsedCredit

integer

The credit usage in the last 1 week.

Credits consumed in the last week

TotalUsedCredit

integer

The cumulative credit usage.

Total credits consumed

TotalCredit

integer

The cumulative total credits.

Credit quota

RemainCredit

integer

The cumulative remaining credits.

Remaining credits

CurrentTotalCredit

integer

The total credits of the currently active credit package.

Credit quota for the current period

CurrentRemainCredit

integer

The remaining credits of the currently active credit package.

Remaining credits for the current period

CurrentUsedCredit

integer

The used credits of the currently active credit package.

Credits consumed in the current period

CurrentInstanceId

string

The instance ID of the currently active credit package.

cp-inst-001

CreditTrendList

array<object>

The hourly consumption samples of the current credit package.

object

The hourly consumption samples of the current credit package.

TimePoint

string

The time point in the format yyyy-MM-dd HH (accurate to the hour).

2026-05-02 10

UsedCredit

integer

The number of credits consumed during the hour.

12

WarnPercent

integer

The alert threshold percentage (0–100).

80

PeriodUsedCredit

integer

The shared credit usage in the current active period.

120

PeriodTotalCredit

integer

The shared credit quota in the current active period.

300

TodayUsed

string

The credits used today.

200

TotalUsed

string

The cumulative credits used.

100

ContactGroupNames

array

The list of contact group names.

string

The first element in the contact group name list.

CQGG

LastTriggeredAt

string

The last triggered time.

2026-05-02 10:10:10

AvailableAmount

integer

The number of instances currently available for the registered resource.

9976.00

RemainCreditInfo

object

The remaining credit information.

DeductingAmount

integer

The number of instances currently being deducted.

23

PendingAmount

integer

The number of instances pending activation.

24

CurrentInstanceExpiredTime

string

The time when the current instance expires.

2026-12-02 00:00:00

PeriodSharedUsedCredit

integer

The shared credits consumed in the current period.

120

PeriodPayGoUsedCredit

integer

The pay-as-you-go credits consumed in the current period.

240

PeriodTotalUsedCredit

integer

The total credits consumed in the current period.

360

PeriodCreditQuota

integer

The credit quota for the current period.

2000

Examples

Success response

JSON format

{
  "RequestId": "68BD3312-53D8-123E-BB32-1A9F25E07A03",
  "UsageInfoList": [
    {
      "UsageInfoKey": "agent-abc",
      "UsageInfo": {
        "DayUsedCredit": 0,
        "WeekUsedCredit": 0,
        "TotalUsedCredit": 0,
        "TotalCredit": 0,
        "RemainCredit": 0,
        "CurrentTotalCredit": 0,
        "CurrentRemainCredit": 0,
        "CurrentUsedCredit": 0,
        "CurrentInstanceId": "cp-inst-001",
        "CreditTrendList": [
          {
            "TimePoint": "2026-05-02 10",
            "UsedCredit": 12
          }
        ],
        "WarnPercent": 80,
        "PeriodUsedCredit": 120,
        "PeriodTotalCredit": 300,
        "TodayUsed": "200",
        "TotalUsed": "100",
        "ContactGroupNames": [
          "CQGG"
        ],
        "LastTriggeredAt": "2026-05-02 10:10:10",
        "AvailableAmount": 9976,
        "RemainCreditInfo": {
          "DeductingAmount": 23,
          "PendingAmount": 24
        },
        "CurrentInstanceExpiredTime": "2026-12-02 00:00:00",
        "PeriodSharedUsedCredit": 120,
        "PeriodPayGoUsedCredit": 240,
        "PeriodTotalUsedCredit": 360,
        "PeriodCreditQuota": 2000
      }
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.