All Products
Search
Document Center

ApsaraVideo Live:ModifyStudioLayout

Last Updated:Dec 29, 2025

Modifies the layout of a production studio.

Operation description

You can call this API to modify the layout of a production studio. When you modify layout settings, pass only the parameters that you want to change.

QPS limit

The queries per second (QPS) limit for this API is 10 calls per second for each user. If you exceed the limit, API calls are throttled. This may affect your business. We recommend that you adhere to this limit.

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

live:ModifyStudioLayout

update

*Caster

acs:live:*:{#accountId}:caster/{#CasterId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-shanghai

CasterId

string

Yes

The ID of the production studio.

Important You must create a production studio of the virtual studio type in advance.

  • If you create a production studio by calling the CreateCaster API, view the value of the CasterId parameter in the response.

  • If you create a production studio in the ApsaraVideo Live console, go to the ApsaraVideo Live console > Production Studio > Cloud Production Studio page to view the ID.

Note

The name of the production studio in the list on the Cloud Production Studio page is the production studio ID.

a2b8e671-2fe5-4642-a2ec-bf93880e****

LayoutId

string

Yes

The layout ID. If you add a layout for the production studio by calling the AddStudioLayout API, view the value of the LayoutId parameter in the response.

445409ec-7eaa-461d-8f29-4bec2eb9****

LayoutName

string

No

The name of the production studio layout.

测试布局

CommonConfig

string

No

The common layout configuration. The value is a JSON string. For more information, see CommonConfig.

Important This parameter is required only when LayoutType is set to common.

{ "ChannelId":"RV01" }

BgImageConfig

string

No

The background resource configuration. The value is a JSON string. For more information, see BgImageConfig.

Important This parameter is required only when LayoutType is set to studio.

{ "Id":"k12kj31****", "MaterialId":"f080575eb5f4427684fc0715159a****" }

ScreenInputConfigList

string

No

The chroma keying input settings. The value is a JSON string. For more information, see ScreenInputConfig.

Important This parameter is required only when LayoutType is set to studio.

[ { "Index":"1", "ChannelId":"RV01", "Color":"green", "PositionX":"0.1", "PositionY":"0.2", "HeightNormalized":"0.4" } ]

MediaInputConfigList

string

No

The multimedia input resource settings. The value is a JSON string. For more information, see MediaInputConfig.

Important This parameter is valid and optional only when LayoutType is set to studio.

[ { "Id":"k12kj31****", "Index":"1", "ChannelId":"RV01", "FillMode":"none", "PositionRefer":"topLeft", "WidthNormalized":"0.4", "HeightNormalized":"0.4", "PositionNormalized":"[0.1, 0.2]" }, { "Id":"k12kj31****", "Index":"2", "ImageMaterialId":"lkajsdfsa8fd89asd8****", "FillMode":"none", "PositionRefer":"topLeft", "WidthNormalized":"0.6", "HeightNormalized":"0.4", "PositionNormalized":"[0.1, 0.2]" } ]

LayerOrderConfigList

string

No

The layer order settings. The value is a JSON string. For more information, see layerOrderConfig. You can sort background and multimedia materials. Chroma keying layers are not supported for sorting. The earlier a layer appears in the list, the lower it is in the stack.

[ { "Type":"media", "Id":"k12kj31****" }, { "Type":"media", "Id":"k12kj31****" } ]

CommonConfig

NameTypeExampleDescription
ChannelIdStringRV01The ID of the channel to which the video resource is attached.

BgImageConfig

Note

You can specify only one of ImageUrl and MaterialId.

ScreenInputConfig

NameTypeExampleDescription
IndexInteger1The number of the chroma keying source. This is used for frontend display and has no logical function. The value must be a positive integer (>0).
ChannelIdStringRV01The ID of the channel to which the video resource is attached.
ColorStringgreenThe chroma keying color space. Valid values:
blue: Blue screen background.
green: Green screen background.
auto: Automatic detection.
complex: Real-world chroma keying.










PositionXFloat0.1The x-coordinate. Valid values: [0,1].
The position is relative to the top-left corner.

PositionYFloat0.2The y-coordinate. Valid values: [0,1].
The position is relative to the top-left corner.

HeightNormalizedFloat0.4The normalized height. This is the height ratio of the keyed figure to the background. Valid values: [0,1].

MediaInputConfig

  • If the multimedia material is a video source, specify ChannelId.

  • If the multimedia material is an image, specify ImageMaterialId.

  • ChannelId and ImageMaterialId are mutually exclusive. Specify only one of them.

NameTypeExampleDescription
IdStringk12kj31****The unique ID of the multimedia material.
IndexInteger1The number of the multimedia material. This is used for frontend display and has no logical function. The value must be a positive integer (>0).
ChannelIdStringRV01The ID of the channel to which the video resource is attached.
ImageMaterialIdStringlkajsdfsa8fd89asd8****The ID of the VOD image material.
FillModeStringnoneThe fill type. Set this parameter to none.
PositionReferStringtopLeftThe reference point for the material's position. Set this parameter to topLeft. This indicates that the position is relative to the top-left corner.
WidthNormalizedFloat0.4The normalized width of the material. This is the width ratio of the material to the background. Valid values: [0,1].
HeightNormalizedFloat0.4The normalized height of the material. This is the height ratio of the material to the background. Valid values: [0,1].
PositionNormalizedFloat[0.1, 0.2]The normalized position [x,y] of the material's fill area. The valid values for x and y are [0,1].
For example, [0.1, 0.2] indicates a horizontal offset of 10% and a vertical offset of 20% from the top-left corner.

layerOrderConfig

NameTypeExampleDescription
IdStringk12kj31****The unique ID of the resource.
TypeStringmediaThe type of the resource configuration.
background: Background material.
media: Multimedia material.




Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

5c6a2a0d-f228-4a64-af62-20e91b9676b3

Examples

Success response

JSON format

{
  "RequestId": "5c6a2a0d-f228-4a64-af62-20e91b9676b3"
}

Error codes

HTTP status code

Error code

Error message

Description

400 MissingParameter %s
400 InvalidParameter.Malformed %s
400 InvalidCasterId.Malformed %s
400 InvalidUserId.Malformed %s
400 InvalidPositionNormalized.Malformed %s
400 InvalidHeightOrWidthNormalized %s
401 IllegalOperation %s
500 InternalError %s
404 InvalidCaster.NotFound %s
404 InvalidLayout.NotFound %s, please check and try again later. LayoutId does not exist, please check and try again.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.