全部產品
Search
文件中心

ApsaraVideo Live:CreateLiveAIStudio

更新時間:Jun 23, 2026

本介面用於建立輕量化虛擬演播範本。

介面說明

重要 輕量化虛擬演播功能處於公測階段,單個使用者最多建立 300 個範本。暫時免費使用,公測結束後將正常收費,具體時間另行通知。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

live:CreateLiveAIStudio

create

*All Resource

*

請求參數

名稱

類型

必填

描述

樣本值

RegionId

string

地域 ID。

cn-shanghai

StudioName

string

虛擬演播範本名稱,不可重複。

stu02

Description

string

自訂描述資訊。

template 1080

Width

integer

預覽畫面寬度,單位:px。

1920

Height

integer

預覽畫面高度,單位:px。

預覽畫面寬度 x 高度僅支援以下規格:

  • 橫屏流暢 360P 640x360

  • 豎屏流暢 360P 360x640

  • 橫屏標清 480P 854x480

  • 豎屏標清 480P 480x854

  • 橫屏高清 720P 1280x720

  • 豎屏高清 720P 720x1280

  • 橫屏超清 1080P 1920x1080

  • 豎屏超清 1080P 1080x1920。

1080

BackgroundType

string

背景素材類型:

  • VOD 點播影片

  • PIC 圖片

  • LIVE 直播流。

枚舉值:

  • VOD :

    點播影片。

  • PIC :

    圖片。

  • LIVE :

    直播流。

VOD

BackgroundResourceId

string

背景素材的點播資源 id,從點播控制台取得。

d0eb493192c771efba644531858c0102

BackgroundResourceUrl

string

背景素材的資源存取 url,與資源 id 二選一傳入。

https://xxx.com/1.mp4

MediaType

string

多媒體素材類型:

  • VOD 點播影片

  • PIC 圖片

  • LIVE 直播流。

枚舉值:

  • VOD :

    點播影片。

  • PIC :

    圖片。

  • LIVE :

    直播流。

VOD

MediaResourceId

string

多媒體素材的點播資源 id,從點播控制台取得。

d0eb493192c771efba644531858c0102

MediaResourceUrl

string

多媒體素材的資源存取 url,與資源 id 二選一傳入。

https://xxx.com/2.mp4

MediaLayout

object

多媒體素材的佈局位置資訊。

PositionX

number

位置參數,座標 x。取值:0~1。素材位置以左上角為基準點。

0

PositionY

number

位置參數,座標 y。取值:0~1。素材位置以左上角為基準點。

0

HeightNormalized

number

素材的高度歸一化值。即素材與背景的高度比。取值:0~1

0.5

MattingType

string

摳圖類型:

  • green 綠幕摳圖

  • blue 藍幕摳圖

  • complex 實景摳圖。

枚舉值:

  • green :

    綠幕摳圖。

  • blue :

    藍幕摳圖。

  • complex :

    實景摳圖。

complex

MattingLayout

object

來源流摳圖後的佈局位置資訊。

PositionX

number

位置參數,座標 x。取值:0~1。素材位置以左上角為基準點。

0.3

PositionY

number

位置參數,座標 y。取值:0~1。素材位置以左上角為基準點。

0.3

HeightNormalized

number

素材的高度歸一化值。即素材與背景的高度比。取值:0~1

0.5

返回參數

名稱

類型

描述

樣本值

object

回應結構體。

RequestId

string

請求 id。

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

StudioId

string

演播範本 id。

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

樣本

正常返回樣本

JSON格式

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

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 LiveServiceNotFound %s, please check and try again later.
400 InvalidParameter.PurchaseTime %s, please check and try again later.
400 InvalidParameter.ExpireTime %s, please check and try again later.
400 InvalidParameter %s.
400 MissingParameter %s.
400 InvalidChargeType.Malformed %s, please check and try again later.
400 InvalidChargeType.PostSupport %s, please check and try again later.
400 InvalidCasterTemplate.Malformed %s, please check and try again later.
400 InvalidParameter.Malformed There are invalid parameters: %s.
400 InvalidParameter.ChargeType %s, please check and try again later.
400 InvalidPeriod.Malformed %s, please check and try again later.
400 InvalidUserId.Malformed %s, please check userId.
400 InvalidClientToken.Malformed %s, please check and try again later.
400 IncorrectCasterStatus %s, please check and try again later.
401 CasterNumberExceed %s, please check and try again later.
403 PermissionDenied %s, please check and try again later.
404 InvalidParameter.NormType %s, please check and try again later.
404 InvalidConfiguration.NotFound %s, please check and try again later.
408 CreateLiveAIStudio.Timeout %s, please try again later.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情