Help Center/ MetaStudio/ API Reference/ Tenant Management/ Viewing Tenant Resource Usage
Updated on 2025-12-08 GMT+08:00

Viewing Tenant Resource Usage

Function

Queries the one-off and yearly/monthly resource usage of a tenant.

For details about the billing modes of various resources, see Billing Overview.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

URI

GET /v1/{project_id}/tenants/resources-usage

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

resource

No

String

Resource type. You can enter multiple resource types and separate them with commas (,). For details, see Resource Type.

business

No

String

Service type. You can enter multiple service types and separate them with commas (,).

  • VOICE_CLONE: voice modeling

  • SYNTHETICS_SOUND: voice synthesis

  • ASSET_MANAGER: asset management

  • MODELING_2D: image modeling

  • LIVE_2D: virtual avatar livestreaming

  • VIDEO_2D: virtual avatar video production

  • CHAT_2D: virtual avatar intelligent interaction

  • BUSINESS_CARD_2D: virtual avatar business card

  • PICTURE_2D: photo-based virtual avatar video

  • MODELING_3D: 3D photo-based modeling

  • VDS_3D: 3D visual control

  • TTSA_3D: 3D speech control

  • FLEXUS_2D: Flexus resources

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

User token. This parameter is mandatory when token authentication is used.

You can obtain the token by calling the IAM API used to obtain a user token.

Value of X-Subject-Token in the response header.

Authorization

No

String

Authentication information. This parameter is mandatory for AK/SK authentication.

X-Sdk-Date

No

String

Time when the request is sent. This parameter is mandatory for AK/SK authentication.

The format is YYYYMMDD'T'HHMMSS'Z'.

X-Project-Id

No

String

Project ID. This parameter is mandatory for AK/SK authentication.

Response Parameters

Status code: 200

Table 4 Response header parameters

Parameter

Type

Description

X-Request-Id

String

Request ID.

Table 5 Response body parameters

Parameter

Type

Description

resources

Array of ResourceUsageInfo objects

Resource usage list

Table 6 ResourceUsageInfo

Parameter

Type

Description

resource_type

String

Resource type. For details, see Resource Type.

business_type

String

Service type.

  • VOICE_CLONE: voice modeling

  • SYNTHETICS_SOUND: voice synthesis

  • ASSET_MANAGER: asset management

  • MODELING_2D: image modeling

  • LIVE_2D: virtual avatar livestreaming

  • VIDEO_2D: virtual avatar video production

  • CHAT_2D: virtual avatar intelligent interaction

  • BUSINESS_CARD_2D: virtual avatar business card

  • PICTURE_2D: photo-based virtual avatar video

  • MODELING_3D: 3D photo-based modeling

  • VDS_3D: 3D visual control

  • TTSA_3D: 3D speech control

  • FLEXUS_2D: Flexus resources

sub_resource_type

String

Sub-resource type. Currently, this field is available only for Flexus packages.

  • voice_clone_flexus: Voice cloning (Flexus edition)

  • modeling_count_2d_model_flexus: Virtual avatar image modeling (Flexus edition)

  • video_time_flexus_2d_model: Virtual avatar video production (Flexus edition)

is_sub_resource

Boolean

Whether the resource is a sub-resource. If yes, the quantity and unit of the sub-resource are described.

Default value:

false

charging_mode

String

Billing mode.

  • PERIODIC: yearly/monthly

  • ONE_TIME: one-off billing

  • ON_DEMAND: pay-per-use billing

resource_source

String

Resource source.

  • PURCHASED: purchased

  • SP_ALLOCATED: allocated by the SP

  • ADMIN_ALLOCATED: allocated by the administrator

amount

Float

Total quantity

Value range:

0~1000000

usage

Float

Usage

Value range:

0~1000000

unit

String

Unit.

  • NUM: avatar/voice quantity

  • MIN: minute (video production)

  • HOUR: hour (livestream duration)

  • CHANNEL: task (livestreaming/interaction)

  • GB: GB (asset management)

  • MILLION_WORDS: one million characters

  • TEN_THOUSAND_WORDS: ten thousand characters

  • TIME: times

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

GET https://{endpoint}/v1/f488337c31c8e4622f1590735b134c65/tenants/resources-usage

Example Responses

Status code: 200

Views tenant information.

{
  "resources" : [ {
    "resource_type" : "video",
    "charging_mode" : "ONE_TIME",
    "amount" : 6000,
    "usage" : 100.5,
    "unit" : "MIN"
  } ]
}

Status code: 400

Parameters error, including the error code and its description.

{
  "error_code" : "MSS.00000003",
  "error_msg" : "Invalid parameter"
}

Status Codes

Status Code

Description

200

Views tenant information.

400

Parameters error, including the error code and its description.

Error Codes

See Error Codes.