视频(Videos)原厂火山格式素材库素材
上传素材
把一个可公网访问的 URL 登记为素材,上游异步下载入库。创建成功不代表可用,需轮询 GetAsset 直到状态为 Active。尺寸过小或无法下载的图片会被上游拒收,表现为创建报错或状态 Failed。
Authorization
bearerAuth
AuthorizationBearer <token>
Authorization: Bearer
In: header
Query Parameters
Action*string
固定为 CreateAsset
Value in
"CreateAsset"Request Body
application/json
GroupId*string
所属素材组 ID
Name*string
素材名称
AssetType*string
素材类型
Value in
"Image" | "Video" | "Audio"URL*string
素材地址,需可被上游下载
Response Body
application/json
curl -X POST "https://jiniu.ai/api/material?Action=CreateAsset" \ -H "Content-Type: application/json" \ -d '{ "GroupId": "group-xxxx", "Name": "主图", "AssetType": "Image", "URL": "https://example.com/a.png" }'{
"ResponseMetadata": {
"RequestId": "…",
"Action": "CreateAsset"
},
"Result": {
"Id": "asset-xxxx"
}
}