素材 Action
创建素材
CreateAsset - 通过公共 URL 创建图片、视频或音频素材
AuthorizationBearer <token>
兼容网关 API Key,例如 sk-...。
In: header
Query Parameters
Action*string
Default
"CreateAsset"Version*string
Default
"2024-01-01"Header Parameters
X-Date?string
使用 HMAC-SHA256 时必填,格式为 YYYYMMDDTHHMMSSZ。
X-Content-Sha256?string
使用 HMAC-SHA256 时必填,请求体 SHA-256 小写十六进制。
Request Body
application/json
GroupId?string
素材所属的素材组 ID。
URL?string
公共可访问的素材 URL,不支持 Base64。
Format
uriName?string
仅用于列表搜索,不会带入模型推理。
Length
length <= 64AssetType?string
Value in
"Image" | "Video" | "Audio"ProjectName?string
资源所属项目名称,必须与目标素材组的 ProjectName 一致。
Default
"default"Response Body
application/json
application/json
curl -X POST "https://jieyun.cc/?Action=CreateAsset&Version=2024-01-01" \ -H "Content-Type: application/json" \ -d '{ "GroupId": "group-202607210001-example", "URL": "https://example.com/assets/product.png", "Name": "产品主图", "AssetType": "Image", "ProjectName": "default" }'{
"ResponseMetadata": {
"RequestId": "20260721000000000000000000000000",
"Action": "CreateAsset",
"Version": "2024-01-01",
"Service": "ark",
"Region": "cn-beijing"
},
"Result": {
"Id": "asset-202607210001-example"
}
}{
"ResponseMetadata": {
"RequestId": "string",
"Action": "CreateAsset",
"Version": "2024-01-01",
"Service": "ark",
"Region": "cn-beijing",
"Error": {
"Code": "string",
"Message": "string"
}
}
}Empty
Empty
Empty
Empty
最后更新于