Updated on 2024-07-04 GMT+08:00

Querying Assets

Function

You can query media assets in the asset library.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/digital-assets

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

limit

No

Integer

Number of items displayed on each page.

offset

No

Integer

Offset where the query starts.

name

No

String

Fuzzy search by name.

tag

No

String

Fuzzy search by tag.

tag_combination_type

No

String

Tag query combination mode.

INTERSECTION

UNION_SET

start_time

No

String

Start time. The format complies with RFC 3339, for example, 2021-01-10T08:43:17Z.

end_time

No

String

End time. The format complies with RFC 3339, for example, 2021-01-10T10:43:17Z.

asset_type

No

String

Asset type. If there are more than one, separate them with commas (,).

  • HUMAN_MODEL: 3D virtual human model
  • VOICE_MODEL: timbre model (uploaded only by the system administrator)
  • SCENE: scene model
  • ANIMATION: animated actions
  • VIDEO: video file
  • IMAGE: image file
  • PPT: slide file
  • MATERIAL: stylized materials
  • HUMAN_MODEL_2D: virtual avatar network model
  • BUSINESS_CARD_TEMPLET: business card template
  • MUSIC: music
  • AUDIO: audio

sort_key

No

String

Sorting field. Currently, only create_time is supported.

sort_dir

No

String

Sorting mode.

  • asc: ascending order
  • desc: descending order

asc is used by default.

asset_source

No

String

Asset source.

  • SYSTEM: system asset
  • CUSTOMIZATION: tenant asset
  • ALL: all assets

Tenant assets are queried by default.

asset_state

No

String

Asset status. If there is more than one, separate them with commas (,).

  • CREATING: The asset is being created. The main file has not been uploaded.
  • FAILED: Main file upload fails.
  • UNACTIVED: The main file is uploaded successfully. The asset is not activated, and it cannot be used for other services. (Users can update the status.)
  • ACTIVED: The main file is uploaded successfully. The asset is activated, and it can be used for other services. (Users can update the status.)
  • DELETING: The asset is being deleted. The asset is unavailable but can be restored.
  • DELETED: The asset is deleted. The asset is unavailable and cannot be restored.
  • BLOCK: The asset is frozen. The asset is unavailable and cannot be viewed.

    By default, assets in all statuses are queried.

style_id

No

String

Query associated assets by style ID.

  • system_male_001: male style 01
  • system_female_001: female style 01
  • system_male_002: male style 02
  • system_female_002: female style 02

render_engine

No

String

Available engine.

  • UE: UE engine
  • MetaEngine: MetaEngine
NOTE:

This field is valid only for users in the MetaEngine whitelist.

asset_id

No

Array

Asset ID.

sex

No

String

Gender. Use commas (,) to separate multiple options.

language

No

String

Language. If there is more than one, separate them with commas (,).

system_property

No

String

System attribute.

key and value are separated with colons (:). Use commas (,) to separate them if there are more than one key.

For example, system_property=BACKGROUND_IMG:Yes,RENDER_ENGINE:MetaEngine.

Options:

Public asset attribute. Options:

  • BACKGROUND_IMG: 2D background image for video production. The value can be Yes.
  • CREATED_BY_PLATFORM: indicates whether it is generated by the platform. The value can be Yes.

Virtual avatar asset attribute. Options:

  • MATERIAL_IMG: material image used as the foreground. The value can be Yes.
  • MATERIAL_VIDEO: material video used as the foreground. The value can be Yes.
  • TO_BE_TRANSLATED_VIDEO: source video for translation. The value can be Yes.

3D virtual human asset attribute. Options:

  • STYLE_ID: style ID
  • RENDER_ENGINE: engine type. The value can be UE or MetaEngine.
  • BACKGROUND_SCENE: 2D background scene for video production. The value can be Horizontal or Vertical.

action_editable

No

Boolean

Indicates whether an action is editable. This parameter is only available for virtual avatar model query.

is_movable

No

Boolean

Whether a virtual avatar can walk. This parameter is valid only for querying virtual human models.

voice_provider

No

String

The value can be HUAWEI_METASTUDIO or MOBVOI.

HUAWEI_METASTUDIO: MetaStudio's proprietary timbre

MOBVOI: Mobvoi's timbre

role

No

String

Role. SHARER: sharer. SHAREE: sharee

is_realtime_voice

No

Boolean

Whether the timbre supports real-time compositing. This parameter is valid only for timbre query.

NOTE:
  • Timbre that supports real-time compositing can be used for livestreaming and intelligent interaction. Timbre that does not support real-time compositing can only be used for video production.

human_model_2d_version

No

String

Model version

include_device_name

No

String

Name of a compilation task that has been executed under an asset

exclude_device_name

No

String

Name of a compilation task that has been executed under an asset

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-App-UserId

No

String

Third-party user ID, which does not allow Chinese characters.

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

count

Integer

Total assets.

assets

Array of DigitalAssetInfo objects

Asset information list.

Table 6 DigitalAssetInfo

Parameter

Type

Description

project_id

String

Tenant ID

asset_id

String

Asset ID.

asset_name

String

Asset name.

asset_description

String

Asset description.

app_user_id

String

Third-party user ID.

NOTE:
  • An asset is created by specifying the value of the X-App-UserId header.

create_time

String

Time when an asset is created.

update_time

String

Time when an asset is updated.

asset_type

String

Asset types.

Public asset type. Options:

  • VOICE_MODEL: timbre model
  • VIDEO: video file
  • IMAGE: image file
  • PPT: slide file
  • MUSIC: music
  • AUDIO: audio
  • COMMON_FILE: common file

Virtual avatar asset type. Options:

  • HUMAN_MODEL_2D: virtual avatar model
  • BUSINESS_CARD_TEMPLET: business card template

3D virtual human asset type. Options:

  • HUMAN_MODEL: 3D virtual human model
  • SCENE: scene model
  • ANIMATION: animated actions
  • MATERIAL: stylized materials
  • NORMAL_MODEL: normal model

asset_state

String

Asset status:

  • CREATING: The asset is being created. The main file has not been uploaded.
  • FAILED: Main file upload fails.
  • UNACTIVED: The main file is uploaded successfully. The asset is not activated, and it cannot be used for other services. (Users can update the status.)
  • ACTIVED: The main file is uploaded successfully. The asset is activated, and it can be used for other services. (Users can update the status.)
  • DELETING: The asset is being deleted. The asset is unavailable but can be restored.
  • DELETED: The asset is deleted. The asset is unavailable and cannot be restored.
  • BLOCK: The asset is frozen. The asset is unavailable and cannot be viewed.

fail_type

String

Failure causes:

  • AUTOMATIC_REVIEW_REJECT: Auto review failed.
  • MANUAL_REVIEW_REJECT: Manual review failed.

reason

String

Freezing, unfreezing, and failure causes.

tags

Array of strings

Tags.

asset_extra_meta

AssetExtraMeta object

Asset metadata. Sets this parameter based on the asset type.

system_properties

Array of SystemProperty objects

Sets system attributes.

files

Array of AssetFileInfo objects

Files under an asset.

asset_order

Integer

Display sequence.

Table 7 AssetExtraMeta

Parameter

Type

Description

human_model_meta

HumanModelAssetMeta object

Virtual human model metadata.

voice_model_meta

VoiceModelAssetMeta object

Timbre model metadata.

ppt_meta

PPTAssetMeta object

PPT asset metadata information.

animation_meta

AnimationAssetMeta object

Animated action asset metadata.

scene_meta

SceneAssetMeta object

Scenario metadata.

material_meta

MaterialAssetMeta object

Material metadata.

human_model_2d_meta

HumanModel2DAssetMeta object

Virtual avatar model metadata

image_meta

ImageAssetMeta object

Image metadata

video_meta

VideoAssetMeta object

Video metadata, which is automatically extracted.

audio_meta

AudioAssetMeta object

Audio metadata, which is automatically extracted.

Table 8 HumanModelAssetMeta

Parameter

Type

Description

style_id

String

Virtual human model style ID.

  • system_male_001: male style 01
  • system_female_001: female style 01
  • system_male_002: male style 02
  • system_female_002: female style 02

modeling_type

String

Modeling type of the virtual human model.

  • UPLOADED: model uploaded by a tenant
  • PICTURE_MODELING: model generated by photo
  • CHARACTER_CUSTOMIZATION_MODELING: model generated by creating a face avatar

modeling_job_id

String

Modeling task ID.

model_properties

HumanModelMetaProperties object

Records model configuration information.

components

Array of ComponentInfo objects

Replaceable components.

Table 9 HumanModelMetaProperties

Parameter

Type

Description

whole_model_base_file_id

String

Indicates the file_id based on which the WHOLE_MODEL in the current model is generated. If the current ID is the same as the file_id of the MAIN file, the WHOLE_MODEL has been generated and does not need to be exported.

load_model_file_id

String

file_id used for loading. If the ID is null or no ID is matched, the MAIN file is used.

Table 10 ComponentInfo

Parameter

Type

Description

component_name

String

Component name.

component_type

String

Component type.

component_desc

String

Component description.

Table 11 VoiceModelAssetMeta

Parameter

Type

Description

order

Integer

Display order

model_type

String

Timbre asset type.

  • COMMON: general emotion model
  • CLONE: voice cloning model

sex

String

Timbre gender.

  • UNKNOW: neutral timbre
  • MALE: male timbre
  • FEMALE: female timbre

The default value is UNKNOW.

language

String

Timbre languages:

  • UNKNOW: unknown
  • CN: Chinese
  • EN: English
  • GER: German
  • fr: French
  • Kr: Korean
  • por: Portuguese
  • JPN: Japanese
  • Ita: Italian
  • ESP: Spanish
  • DBH: Northeast China dialect
  • GT: Cantonese & Taiwan dialect
  • GXH: Guangxi dialect
  • HBH: Hubei dialect
  • SXH: Shaanxi dialect
  • SCH: Sichuan dialect
  • YY: Cantonese
  • Russian: Russian
  • Filipino: Tagalog
  • Dutch: Dutch
  • Indonesian: Indonesian
  • Vietnamese: Vietnamese
  • Arabic: Arabic
  • Turkish: Turkish
  • Malay: Malay
  • Thai: Thai
  • Finnish: Finnish

The default value is UNKNOW.

speed_ratio

Float

Speech speed zoom ratio

volume_ratio

Float

Volume zoom ratio

is_realtime_voice

Boolean

Whether the timbre supports real-time compositing. The default value is true.

NOTE:
  • Timbre that supports real-time compositing can be used for livestreaming and intelligent interaction. Timbre that does not support real-time compositing can only be used for video production.

voice_capability

VoiceCapability object

Capability set supported by the timbre asset.

NOTE:

The timbre capability set can be queried but cannot be configured.

external_voice_meta

ExternalVoiceAssetMeta object

Third-party TTS timbre metadata.

Table 12 VoiceCapability

Parameter

Type

Description

is_support_phoneme_en

Boolean

English phonetic symbols are supported.

is_support_phoneme

Boolean

Whether multi-pronunciation words are supported.

is_support_break_time

Boolean

Whether pauses are supported.

is_support_break_strength

Boolean

Whether rhythm is supported.

is_support_speed

Boolean

Whether global speaking speed is supported.

is_support_prosody

Boolean

Whether local speaking speed is supported.

is_support_ssml_say_as

Boolean

Whether the say-as SSML tag is supported.

is_support_ssml_sub

Boolean

Whether the sub SSML tag is supported.

is_support_word

Boolean

Whether continuous reading is supported.

Table 13 ExternalVoiceAssetMeta

Parameter

Type

Description

provider

String

Third-party TTS vendor. Options:

  • XIMALAYA: Himalaya
  • HUAWEI_EI: Huawei Cloud EI
  • MOBVOI: Mobvoi
  • AUDIOX: AudioX
  • SINOVOICE: SinoVoice
  • DATABACK: DataBaker
  • AISPEECH: AISpeech
Table 14 PPTAssetMeta

Parameter

Type

Description

auto_analysis

Boolean

Indicates whether the PPT needs to be automatically parsed.

ppt_analysis_status

String

PPT resolution status.

  • INITIALIZE: initial
  • WAITING: waiting
  • CONVERTING: being parsed
  • FAILED: failed
  • SUCCEEDED: successful
  • CANCELED: canceled

error_info

ErrorResponse object

Error information

page_count

Integer

Total number of PPT pages.

pages

Array of PPTPageInfo objects

PPT page image.

Table 15 PPTPageInfo

Parameter

Type

Description

page_no

Integer

Page number.

file_id

String

ID of the image file corresponding to the page.

page_content

String

Commentary (extracted from remarks).

Table 16 AnimationAssetMeta

Parameter

Type

Description

style_id

String

Virtual human model style ID.

duration

Float

Animation duration.

auto_analysis

Boolean

Indicates whether an action needs to be automatically parsed.

voice_delay

Float

Delay duration for playing a voice.

Unit: second

For example, if the entry animation lasts for 3 seconds and voice_delay is set to 4 seconds, the voice is played from the fourth second on after the entry animation starts.

animation_insert_restriction

String

Limit on the position where an animation is inserted.

  • ONLY_BEGINNING: During video production, the animation can appear only in the beginning.
  • ONLY_END: During video production, the animation can appear only in the end.
Table 17 SceneAssetMeta

Parameter

Type

Description

components

Array of SceneComponentInfo objects

Operable components (such as the screen, light, and camera).

default_configs

Map<String,SceneComponentInfo>

Default scene settings (camera position and initial person position).

Table 18 SceneComponentInfo

Parameter

Type

Description

index

Integer

Component index.

component_name

String

Component name.

component_type

String

Component type.

  • CAMERA: camera
  • PANEL: screen
  • LIGHT: light

component_desc

String

Component description.

Table 19 MaterialAssetMeta

Parameter

Type

Description

components

Array of MaterialComponentInfo objects

Replaceable material components.

Table 20 MaterialComponentInfo

Parameter

Type

Description

component_name

String

Material component name.

component_type

String

Material component type.

  • CLOTHES: clothes
  • PANTS: pants
  • SHOES: shoes
  • HAIR: hair
  • EYELASH: eyelashes
  • EYEBROW: eyebrows

component_desc

String

Material component description.

Table 21 HumanModel2DAssetMeta

Parameter

Type

Description

is_action_editable

Boolean

Indicates whether the action of a virtual avatar can be edited (Uneditable by default).

is_real_background

Boolean

Indicates whether a virtual avatar is in a real scene. The real scene will not be replaced.

support_live

Boolean

Indicates whether livestream is supported.

model_version

String

Virtual avatar model version. By default, the V2 model is used.

  • V2: V2 model
  • V3: V3 model
  • V3_2: V3.2 model

model_resolution

String

Virtual avatar model resolution. The default value is 1080P.

  • 1080P: supports 1080P and 720P video output.
  • 4K: supports 4K, 1080P, and 720P video output.

device_names

Array of strings

The compilation task has been executed.

Table 22 ImageAssetMeta

Parameter

Type

Description

codec

String

Image encoding format, which is automatically extracted.

width

Integer

Image width, which is automatically extracted.

height

Integer

Image height, which is automatically extracted.

size

Number

Size

mode

String

Horizontal; Vertical

error_info

ErrorResponse object

Error message

Table 23 VideoAssetMeta

Parameter

Type

Description

video_codec

String

Video encoding format

width

Integer

Video width

height

Integer

Video height

frame_rate

String

Frame rate

video_bit_rate

Integer

Average video bitrate, in kbit/s.

duration

Integer

Duration, in second.

audio_codec

String

Audio encoding format

audio_bit_rate

Integer

Average audio bitrate, in kbit/s.

audio_channels

Integer

Number of audio channels

sample

Integer

Sampling rate, in Hz.

mode

String

Horizontal; Vertical

video_transcoding_status

String

Video transcoding status.

  • WAITING
  • TRANSCODING
  • FAILED
  • SUCCEEDED

error_info

ErrorResponse object

Error message

Table 24 AudioAssetMeta

Parameter

Type

Description

duration

Integer

Duration, in second.

audio_codec

String

Audio encoding format

audio_bit_rate

Integer

Average audio bitrate, in kbit/s.

audio_channels

Integer

Number of audio channels

sample

Integer

Sampling rate, in Hz.

error_info

ErrorResponse object

Error message

Table 25 ErrorResponse

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Table 26 SystemProperty

Parameter

Type

Description

action

String

Operations.

  • ADD: add
  • DELETE: delete

key

String

System attribute.

Public asset attribute. Options:

  • BACKGROUND_IMG: 2D background image for video production. Set value to Yes.
  • CREATED_BY_PLATFORM: whether it is generated by the platform

Virtual avatar asset attribute. Options:

  • MATERIAL_IMG: image used as the foreground. Set value to Yes.
  • MATERIAL_VIDEO: video used as the foreground. Set value to Yes.
  • BUSINESS_CARD_VIDEO: business card video
  • TO_BE_TRANSLATED_VIDEO: source video for translation. The value can be Yes.

3D virtual human asset attribute. Options:

  • STYLE_ID: style ID
  • DH_ID: virtual human ID (not available yet)
  • PLATFORM_AVAILABLE: whether the platform is available (not available yet)
  • RENDER_ENGINE: engine type. Set value to UE or MetaEngine.
  • BACKGROUND_SCENE: 2D background scene for video production. Set value to Horizontal or Vertical.
  • LAYER_CONFIG_ENABLE: available foreground layer configuration

value

String

Attribute value.

Table 27 AssetFileInfo

Parameter

Type

Description

file_id

String

File ID.

file_name

String

The file name is case-insensitive and can contain 1 to 256 characters.

file_md5

String

MD5 value of the file content. The value must contain 24 characters.

file_size

Long

Total file size. The value ranges from 1 to 5368709120.

file_type

String

File type (the file name extension is extracted by default).

asset_file_category

String

File category in an asset. Each type of asset has different file categories.

  • MAIN: main file
  • COVER: thumbnail file
  • PAGE: content page image
  • SAMPLE: sample audio
  • OTHER: other files
  • WHOLE_MODEL: full model
  • USER_MODIFIED_MODEL: model uploaded by a user.
NOTE:
  • When the asset type is SCENE, ANIMATION, VIDEO, IMAGE, or MATERIAL, categories are MAIN, COVER, and OTHER.
  • When the asset type is PPT, categories are MAIN, COVER, PAGE, and OTHER.
  • When the asset type is HUMAN_MODEL, categories are MAIN, COVER, and OTHER.
  • When the asset type is VOICE_MODEL, categories are MAIN, SAMPLE (sample audio file), and OTHER.
  • When the asset type is HUMAN_MODEL_2D, categories are MAIN, COVER, SAMPLE (sample action), and OTHER (mask file).
  • When the asset type is BUSINESS_CARD_TEMPLET, categories are MAIN and COVER (business card demo).

download_url

String

File download URL, which is valid for 24 hours.

state

String

File status. Options:

  • CREATING: being uploaded
  • CREATED: uploaded (auto approved)
  • FAILED: upload failed
  • CANCELLED: upload cancelled
  • DELETING: being deleted
  • DELETED: deleted
  • UPLOADED: uploaded (not approved yet)
  • REVIEW: manual review (uploaded)
  • BLOCK: frozen

reason

String

Rejection reason.

Status code: 400

Table 28 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

GET https://{endpoint}/v1/6a6a1f8354f64dd9b9a614def7b59d83/digital-assets

Example Responses

Status code: 200

Successful.

{
  "count" : 1,
  "assets" : [ {
    "asset_id" : "24bad716-87b1-45e5-8912-6102f7693265",
    "asset_name" : "Culture and tourism 3",
    "asset_description" : "Background image",
    "create_time" : "2021-10-30T12:30:35Z",
    "asset_type" : "IMAGE",
    "asset_state" : "ACTIVED",
    "tags" : [ "Culture and tourism" ],
    "files" : [ {
      "file_id" : "93769b5a-c8c6-4692-9c95-53933a1f0c93",
      "file_name" : "Culture and tourism 3.png",
      "file_md5" : "6sxnj34jQZFvuJhXRwD7nw==",
      "file_size" : 6519699,
      "file_type" : "png",
      "asset_file_category" : "MAIN",
      "download_url" : "https://metastudio.obs.cn-north-4.myhuaweicloud.com:443/SYSTEM/d6e7dde03cab4ce06f2c3cbb19f2682c/9fd37af847980ae086c98d282570bd72.png?AWSAccessKeyId=MYEO6O12LEA6YE2TYTW8&Expires=1706739167&response-content-disposition=attachment%3B+filename*%3Dutf-8%27%27%25E6%2596%2587%25E6%2597%2585%25E9%25A3%258E3.png&x-amz-security-token=ggpjbi1ub3JQ4IEfiM6O&Signature=NzXKRDLDNmkWQI4axyMrTMtKS8k%3D",
      "state" : "CREATED"
    } ]
  } ]
}

Status code: 400

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

Status Codes

Status Code

Description

200

Successful.

400

Parameters error, including the error code and its description.

Error Codes

See Error Codes.