CreateLiveAIStudio

Updated at: 2025-03-20 07:47

Creates a lightweight virtual studio template.

Operation description

Note
The lightweight virtual studio feature is in invitational preview. You can add up to 300 virtual studio templates.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
OperationAccess levelResource typeCondition keyAssociated operation
live:CreateLiveAIStudiocreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ParameterTypeRequiredDescriptionExample
StudioNamestringYes

The name of the virtual studio template. The name must be unique.

stu02
DescriptionstringNo

The custom description.

template 1080
WidthintegerNo

The preview width. Unit: pixels.

1920
HeightintegerNo

The preview height. Unit: pixels.

The following preview specifications (width × height) are supported:

  • Landscape low definition 360p (640×360)
  • Portrait low definition 360p (360×640)
  • Landscape standard definition 480p (854×480)
  • Portrait standard definition 480p (480×854)
  • Landscape high definition 720p (1280×720)
  • Portrait high definition 720p (720×1280)
  • Landscape ultra-high definition 1080p (1920×1080)
  • Portrait ultra-high definition 1080p (1080×1920)
1080
BackgroundTypestringNo

The type of the background material. Valid values:

  • VOD: a video in ApsaraVideo VOD
  • PIC: an image
  • LIVE: a live stream
VOD
BackgroundResourceIdstringNo

The ID of the background material in ApsaraVideo VOD. You can obtain the ID from the ApsaraVideo VOD console.

d0eb493192c771efba644531858c0102
BackgroundResourceUrlstringNo

The URL of the background material. Specify either this parameter or the BackgroundResourceId parameter.

https://xxx.com/1.mp4
MediaTypestringNo

The type of the multimedia material. Valid values:

  • VOD: a video in ApsaraVideo VOD
  • PIC: an image
  • LIVE: a live stream
VOD
MediaResourceIdstringNo

The ID of the multimedia material in ApsaraVideo VOD. You can obtain the ID from the ApsaraVideo VOD console.

d0eb493192c771efba644531858c0102
MediaResourceUrlstringNo

The URL of the multimedia material. Specify either this parameter or the MediaResourceId parameter.

https://xxx.com/2.mp4
MediaLayoutobjectNo

The layout information of the multimedia material.

PositionXfloatNo

The x-coordinate of the material. Valid values: 0 to 1. The upper-left corner is used as the coordinate origin for the material.

0
PositionYfloatNo

The y-coordinate of the material. Valid values: 0 to 1. The upper-left corner is used as the coordinate origin for the material.

0
HeightNormalizedfloatNo

The normalized value of the material height. The value indicates the ratio of the material height to the height of the background. Valid values: 0 to 1.

0.5
MattingTypestringYes

The type of chroma key. Valid values:

  • green: green-screen chroma key
  • blue: blue-screen chroma key
  • complex: background replacement
complex
MattingLayoutobjectYes

The layout information of the chroma-keyed material.

PositionXfloatNo

The x-coordinate of the material. Valid values: 0 to 1. The upper-left corner is used as the coordinate origin for the material.

0.3
PositionYfloatNo

The y-coordinate of the material. Valid values: 0 to 1. The upper-left corner is used as the coordinate origin for the material.

0.3
HeightNormalizedfloatNo

The normalized value of the material height. The value indicates the ratio of the material height to the height of the background. Valid values: 0 to 1.

0.5

Response parameters

ParameterTypeDescriptionExample
ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

17D7526C-69AD-5761-8037-071C27358345
StudioIdstring

The ID of the virtual studio template.

369ced1f-c33a-49e5-91da-bdaae3d6c1c2

Examples

Sample success responses

JSONformat

{
  "RequestId": "17D7526C-69AD-5761-8037-071C27358345",
  "StudioId": "369ced1f-c33a-49e5-91da-bdaae3d6c1c2"
}

Error codes

HTTP status codeError codeError message
HTTP status codeError codeError message
400LiveServiceNotFound%s
400InvalidParameter.PurchaseTime%s
400InvalidParameter.ExpireTime%s
400InvalidParameter%s
400MissingParameter%s
400InvalidChargeType.Malformed%s
400InvalidChargeType.PostSupport%s
400InvalidCasterTemplate.Malformed%s
400InvalidParameter.Malformed%s
400InvalidParameter.ChargeType%s
400InvalidPeriod.Malformed%s
400InvalidUserId.Malformed%s
400InvalidClientToken.Malformed%s
400IncorrectCasterStatus%s
401CasterNumberExceed%s
403PermissionDenied%s
404InvalidParameter.NormType%s
404InvalidConfiguration.NotFound%s
408CreateLiveAIStudio.Timeout%s

For a list of error codes, visit the Service error codes.

Previous:NoneNext: ApsaraVideo Live
  • On this page (1)
  • Operation description
  • Debugging
  • Authorization information
  • Request parameters
  • Response parameters
  • Examples
  • Error codes
Feedback