Creating an Asset
Function
Adds new media assets to the asset library. Assets that can be uploaded include virtual avatar models, background images, image overlays, video overlays, and PowerPoint files.
-
If the asset type is IMAGE, system_properties is used to distinguish background images (BACKGROUND_IMG) and image overlays (MATERIAL_IMG).
-
If the asset type is VIDEO, system_properties is used to classify video overlays (MATERIAL_VIDEO) and business card videos (BUSSINESS_CARD_VIDEO).
The system_properties of videos generated by MetaStudio contains CREATED_BY_PLATFORM.
Constraints
-
Constraints for the main file format and size of different asset types:
Video asset: The asset type is VIDEO, the main file format (case-insensitive) is MP4, M4V, MKV, MOV, FLV, 3GP, WMV, AVI, or WEBM, and the main file size does not exceed 5 GB.
Image asset: The asset type is IMAGE, the main file format (case-insensitive) is JPEG, JPG, PNG, BMP, or GIF, and the main file size does not exceed 50 MB.
Background music asset: The asset type is MUSIC, the main file format (case-insensitive) is WAV, MP3, or M4A, and the main file size does not exceed 100 MB.
Audio asset: The asset type is AUDIO, the main file format (case-insensitive) is WAV, MP3, or M4A, and the main file size does not exceed 100 MB.
PowerPoint file asset: The asset type is PPT, the main file format (case-insensitive) is PPT, PPTX, or PDF, and the main file size does not exceed 100 MB.
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
POST /v1/{project_id}/digital-assets
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request 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. |
|
X-MSS-Authorization |
No |
String |
Internal token of virtual humans. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
asset_name |
Yes |
String |
Details: Asset name. Constraints: N/A Options: The value contains 0 to 256 characters. Default value: N/A |
|
asset_description |
No |
String |
Details: Asset description. Constraints: N/A Options: The value contains 0 to 4,096 characters. Default value: N/A |
|
asset_type |
Yes |
String |
Definition Asset type. Constraints VOICE_MODEL and HUMAN_MODEL_2D are not available for common users. Range Public asset type. Options:
Virtual avatar asset. Options:
Default Value N/A |
|
review_config |
No |
ReviewConfig object |
Configures content review. |
|
tags |
No |
Array of strings |
Details: Tags.
NOTE:
Avatar system asset tag definition:
Constraints: N/A Options: A maximum of 50 tags are allowed. A tag contains 0 to 128 characters. Default value: N/A |
|
asset_extra_meta |
No |
AssetExtraMeta object |
Definition Additional asset metadata. Constraints Select a structure based on asset_type. Other unmatched structures will be ignored.
|
|
system_properties |
No |
Array of SystemProperty objects |
Details: Sets system properties. This is an internal parameter and common users do not need to set it. Constraints: N/A Options: The maximum number is 50. Default value: N/A |
|
shared_config |
No |
AssetSharedConfig object |
Details: Configures asset sharing. Constraints: Currently, this parameter is used only for asset sharing related to livestreaming template sharing. Options: N/A Default value: N/A |
|
is_need_generate_cover |
No |
Boolean |
Details: Whether to generate a thumbnail. Constraints: This parameter is used only for video assets. Options:
Default value: false |
|
asset_order |
No |
Integer |
Details: Specifies the display sequence on the console. If the values are the same, the latest value is placed in the front by default. Constraints: N/A Default value: N/A Value range: 0~32767 |
|
supported_service |
No |
Array of strings |
Supported service type. Options:
|
|
auto_operation_config |
No |
Array of AutoOperationConfig objects |
Auto asset handling task. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
no_need_review |
No |
Boolean |
Content review whitelist. This feature is available only for users in the whitelist. The auto review policies apply to other users. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
voice_model_meta |
No |
VoiceModelAssetMeta object |
Timbre model metadata. |
|
ppt_meta |
No |
PPTAssetMeta object |
PPT asset metadata information. |
|
material_meta |
No |
MaterialAssetMeta object |
Material metadata. |
|
human_model_2d_meta |
No |
HumanModel2DAssetMeta object |
Virtual avatar model metadata |
|
image_meta |
No |
ImageAssetMeta object |
Image metadata |
|
video_meta |
No |
VideoAssetMeta object |
Video metadata, which is automatically extracted. |
|
audio_meta |
No |
AudioAssetMeta object |
Audio metadata, which is automatically extracted. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
order |
No |
Integer |
Details: Display order. Constraints: N/A Value range: 0~32767 Default value: 999 |
|
model_type |
No |
String |
Details: Voice asset type. Constraints: N/A Options:
Default value: CLONE |
|
sex |
No |
String |
Details: Voice gender. Constraints: N/A Options:
Default value: UNKNOW |
|
language |
No |
String |
Details: Voice language. Constraints: N/A Options:
Default value: UNKNOW |
|
languages |
No |
Array of strings |
Definition Voice language. Constraints N/A Range
|
|
speed_ratio |
No |
Float |
Details: Speaking speed zoom ratio. Constraints: N/A Value range: 0~100 Default value: 1 |
|
volume_ratio |
No |
Float |
Details: Volume zoom ratio. Constraints: N/A Value range: 0~100 Default value: 1 |
|
is_realtime_voice |
No |
Boolean |
Details: Whether the timbre supports real-time synthesis. Constraints: Timbre that supports real-time synthesis can be used for livestreaming and intelligent interaction. Timbre that does not support real-time synthesis can only be used for video production. Options:
Default value: true |
|
style |
No |
String |
Style reference |
|
voice_capability |
No |
VoiceCapability object |
Capability set supported by the timbre asset.
NOTE:
The timbre capability set can be queried but cannot be configured.
|
|
external_voice_meta |
No |
ExternalVoiceAssetMeta object |
Third-party TTS timbre metadata. |
|
is_support_vc_process |
No |
Boolean |
Whether VC is supported. Default value: false |
|
is_support_thai_auto_split |
No |
Boolean |
Whether auto text splitting is supported for Thai. Default value: false |
|
is_flexus |
No |
Boolean |
Whether the voice is of the Flexus edition. Default value: false |
|
is_enhance_rhythm |
No |
Boolean |
Whether to enhance rhythm. Default value: false |
|
age |
No |
String |
Timbre age groups: young, middle-aged, and elderly |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
is_support_phoneme_en |
No |
Boolean |
Details: Whether the voice supports English phonetics. Constraints: N/A Options:
Default value: false |
|
is_support_phoneme |
No |
Boolean |
Details: Whether the voice supports Chinese multi-pronunciation words. Constraints: N/A Options:
Default value: false |
|
is_support_break_time |
No |
Boolean |
Details: Whether the voice supports pauses. Constraints: N/A Options:
Default value: false |
|
is_support_break_strength |
No |
Boolean |
Details: Whether the voice supports rhythm. Constraints: N/A Options:
Default value: false |
|
is_support_speed |
No |
Boolean |
Details: Whether the voice supports global speaking speed. Constraints: N/A Options:
Default value: false |
|
is_support_prosody |
No |
Boolean |
Details: Whether the voice supports local speaking speed. Constraints: N/A Options:
Default value: false |
|
is_support_ssml_say_as |
No |
Boolean |
Details: Whether the voice supports say-as SSML tags. Constraints: N/A Options:
Default value: false |
|
is_support_ssml_sub |
No |
Boolean |
Details: Whether the voice supports sub SSML tags. Constraints: N/A Options:
Default value: false |
|
is_support_word |
No |
Boolean |
Details: Whether the voice supports continuous reading. Constraints: N/A Options:
Default value: false |
|
is_support_voice_cache |
No |
Boolean |
Whether cache is supported. Default value: false |
|
conversion_rate |
No |
Float |
Details: Synthesis rate. Constraints: N/A Options:
Value range: 0~50 Default value: 0.0 |
|
conversion_rate_en |
No |
Float |
Details: Synthesis rate of English. Constraints: N/A Options:
Value range: 0~50 Default value: 0.0 |
|
is_support_srt |
No |
Boolean |
Whether STR subtitle files can be generated. Default value: false |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
provider |
Yes |
String |
Third-party TTS vendor. Options:
|
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
auto_analysis |
No |
Boolean |
Details: Whether the PowerPoint file needs to be automatically parsed. Constraints: Parsing some complex PowerPoint files or PowerPoint files with a high compression ratio may fail. If the PowerPoint file contains more than 50 pages, only the first 50 pages will be converted. The converted images may not be completely restored. You need to confirm the restoration result. Options:
Default value: false |
|
ppt_analysis_status |
No |
String |
Details: PowerPoint file parsing status. Constraints: N/A Options:
Default value: N/A |
|
error_info |
No |
ErrorResponse object |
Error information |
|
page_count |
No |
Integer |
Details: Total number of PowerPoint pages. Constraints: N/A Value range: 0~256 Default value: 0 |
|
pages |
No |
Array of PPTPageInfo objects |
PPT page image. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
page_no |
No |
Integer |
Details: Page number. Constraints: N/A Value range: 1~256 |
|
file_id |
No |
String |
Details: ID of the image file of a specified page. Constraints: N/A Options: The value contains 1 to 64 characters. Default value: N/A |
|
page_content |
No |
String |
Details: ID of the image file of a specified page Constraints: N/A Options: The value contains 0 to 2,048 characters. Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
components |
No |
Array of MaterialComponentInfo objects |
Replaceable material components. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
component_name |
Yes |
String |
Material component name. |
|
component_type |
Yes |
String |
Material component type.
|
|
component_desc |
No |
String |
Material component description. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
is_action_editable |
No |
Boolean |
Details: Whether the actions of a virtual avatar can be edited. Constraints: N/A Options:
Default value: false |
|
is_live_copy |
No |
Boolean |
Definition Whether it is a task for training a livestream-based avatar. Constraints N/A Range
Default value: false |
|
is_real_background |
No |
Boolean |
Details: Whether it is a real-scene virtual avatar. Constraints: If yes, the background does not need to be changed. Options:
Default value: false |
|
support_live |
No |
Boolean |
Details: Whether livestreaming is supported. Constraints: N/A Options:
Default value: false |
|
model_version |
No |
String |
Definition Virtual avatar model version. Constraints N/A Range
Default value: V2 |
|
model_resolution |
No |
String |
Details: Virtual avatar model resolution. Constraints: N/A Options:
Default value: 1080P |
|
device_names |
No |
Array of strings |
Details: Devices for which compilation tasks have been executed. Constraints: Walking virtual avatars can be used only for video production. Options: A maximum of 16 device names are allowed. A device name contains 1 to 64 characters. Default value: false |
|
is_with_action_library |
No |
Boolean |
Whether the virtual avatar has an atomic action library.
NOTE:
Default value: false |
|
action_tag_map |
No |
Array of ActionTagInfo objects |
Action tag mapping. |
|
is_flexus |
No |
Boolean |
Whether it is a Flexus virtual avatar. Default value: false |
|
voice_asset_id |
No |
String |
ID of the voice asset associated with the virtual avatar. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
action_name_zh |
Yes |
String |
Atomic action name in Chinese. |
|
action_name_en |
Yes |
String |
Atomic action name in English. |
|
action_duration |
No |
Float |
Action duration. Value range: 0~100 |
|
catalog |
No |
String |
Action category name. |
|
file_name |
No |
String |
Sample video file name. The value contains 1 to 256 characters. |
|
tag |
No |
String |
Action tag. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
codec |
No |
String |
Details: Image encoding format. Constraints: Automatically extracted. Options: The value contains 0 to 32 characters. Default value: N/A |
|
width |
No |
Integer |
Details: Image width. Constraints: Automatically extracted. Default value: N/A Value range: 0~8196 |
|
height |
No |
Integer |
Details: Image height. Constraints: Automatically extracted. Default value: N/A Value range: 0~8196 |
|
size |
No |
Long |
Details: Image size. Constraints: Automatically extracted. Default value: N/A Value range: 0~9223372036854775807 |
|
mode |
No |
String |
Details: Image form. Constraints: Automatically extracted. Options:
Default value: N/A |
|
frame_rate |
No |
String |
Definition Video frame rate. Constraints Automatically extracted. Range The value contains 0 to 32 characters. Default Value N/A |
|
duration |
No |
Integer |
Definition Duration, in seconds. Constraints Automatically extracted. Default Value N/A Value range: 0~86400 |
|
error_info |
No |
ErrorResponse object |
Error message |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
video_codec |
No |
String |
Details: Video encoding format. Constraints: Automatically extracted. Options: The value contains 0 to 32 characters. Default value: N/A |
|
width |
No |
Integer |
Details: Video image width. Constraints: Automatically extracted. Default value: N/A Value range: 0~8196 |
|
height |
No |
Integer |
Details: Video height. Constraints: Automatically extracted. Default value: N/A Value range: 0~8196 |
|
frame_rate |
No |
String |
Details: Video frame rate. Constraints: Automatically extracted. Options: The value contains 0 to 32 characters. Default value: N/A |
|
video_bit_rate |
No |
Integer |
Details: Average video bitrate, in kbit/s. Constraints: Automatically extracted. Default value: N/A Value range: 0~104857600 |
|
duration |
No |
Integer |
Details: Duration, in second. Constraints: Automatically extracted. Default value: N/A Value range: 0~86400 |
|
audio_codec |
No |
String |
Details: Audio encoding format. Constraints: Automatically extracted. Options: The value contains 0 to 32 characters. Default value: N/A |
|
audio_bit_rate |
No |
Integer |
Details: Average audio bitrate, in kbit/s. Constraints: Automatically extracted. Default value: N/A Value range: 0~16384 |
|
audio_channels |
No |
Integer |
Details: Number of audio channels. Constraints: Automatically extracted. Default value: N/A Value range: 0~100 |
|
sample |
No |
Integer |
Details: Sampling rate, in Hz. Constraints: Automatically extracted. Default value: N/A Value range: 0~100000 |
|
mode |
No |
String |
Details: Horizontal or vertical display. Constraints: Automatically extracted. Options:
Default value: N/A |
|
video_transcoding_status |
No |
String |
Details: Video transcoding status. Constraints: Automatically filled. Options:
Default value: N/A |
|
error_info |
No |
ErrorResponse object |
Error message |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
duration |
No |
Integer |
Details: Duration, in second. Constraints: Automatically extracted. Default value: N/A Value range: 0~86400 |
|
audio_codec |
No |
String |
Details: Audio encoding format. Constraints: Automatically extracted. Options: The value contains 0 to 32 characters. Default value: N/A |
|
audio_bit_rate |
No |
Integer |
Details: Average audio bitrate, in kbit/s. Constraints: Automatically extracted. Default value: N/A Value range: 0~16384 |
|
audio_channels |
No |
Integer |
Details: Number of audio channels. Constraints: Automatically extracted. Default value: N/A Value range: 0~100 |
|
sample |
No |
Integer |
Details: Sampling rate, in Hz. Constraints: Automatically extracted. Default value: N/A Value range: 0~100000 |
|
error_info |
No |
ErrorResponse object |
Error message |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
error_code |
No |
String |
Error code. |
|
error_msg |
No |
String |
Error description. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
action |
No |
String |
Details: Operation. Constraints: System properties cannot be modified by common users. Options:
Default value: N/A |
|
key |
No |
String |
Definition System properties. Constraints System properties cannot be modified by common users. Range Public asset property:
Virtual avatar asset property:
Default Value N/A |
|
value |
No |
String |
Details: System attribute value. Constraints: System properties cannot be modified by common users. Options: The value contains 1 to 1,024 characters. Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
shared_type |
No |
String |
Sharing type.
|
|
expire_time |
No |
String |
Time when the sharing expires. The default value is 30 days, that is, 23:59:59 on the day when sharing starts plus 30 days. |
|
allowed_project_ids |
No |
Array of strings |
Tenants allowed to access the asset. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
X-Request-Id |
String |
Request ID. |
|
Parameter |
Type |
Description |
|---|---|---|
|
asset_id |
String |
Digital asset ID. |
|
produce_id |
String |
AI identifier. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Example Requests
POST https://{endpoint}/v1/6a6a1f8354f64dd9b9a614def7b59d83/digital-assets
{
"asset_name" : "Sara Model",
"asset_description" : "Virtual employee",
"asset_type" : "HUMAN_MODEL_2D",
"tags" : [ "Virtual employee" ]
}
Example Responses
Status code: 200
Successful.
{
"asset_id" : "93769b5a-c8c6-4692-9c95-53933a1f0c93"
}
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 |
Successful. |
|
400 |
Parameters error, including the error code and its description. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot