跳轉到正文
開發者文檔/開放 API

素材檢索

按關鍵詞、標籤、顏色和尺寸檢索企業資產。

最近更新

素材檢索

接口路徑:/search-assets

請求方式:POST

接口描述:檢索企業空間內的素材

請求參數:

參數名類型必填描述
-EnterpriseSearchReqVO是素材檢索參數

EnterpriseSearchReqVO 參數說明:

字段名類型必填描述
parentIdLong否指定搜索目錄(不包括根目錄),包含所有子孫
needChildrenBoolean否是否需要子級目錄下的素材,默認 false
extensionsList<String>否文件類型擴展名
colorString否顏色
areaThresholdInteger否顏色佔比,默認 20
colorThresholdInteger否顏色精準度,默認 20
minLengthLong否最小時長(視頻、音頻),單位 ms
maxLengthLong否最大時長(視頻、音頻),單位 ms
minSizeLong否最小文件大小,單位 B
maxSizeLong否最大文件大小,單位 B
minHeightLong否最小圖片高度,單位 px
maxHeightLong否最大圖片高度,單位 px
minWidthLong否最小圖片寬度,單位 px
maxWidthLong否最大圖片寬度,單位 px
startTimeLong否開始時間(更新時間範圍)
endTimeLong否結束時間(更新時間範圍)
keywordsList<String>否搜索關鍵字
tagsList<Long>否標籤 ID 列表
tagOrAndBoolean否標籤篩選 or/and,true=and,默認 true
createUsersList<Long>否創建人 ID 列表
ratingsList<Integer>否評分列表(即 scores)
hasLinkBoolean否是否有鏈接
linkString否輸入鏈接
hasDescBoolean否是否有備註
descString否輸入備註
sortSortConditionVO否排序條件
startPointInteger否分頁開始索引,默認 0
endPointInteger否分頁結束索引,默認 10
regionList<Float>否區域
customFieldTemplateIdsList<Long>否自定義字段模板 ID 列表
customFieldIdLong否自定義字段 ID
currentUserIdLong否僅搜索該用戶有權限的素材
wInteger否目標寬度(px),範圍 1–6000;用於生成返回中的 publicUrl; 超過原圖參數無效
hInteger否目標高度(px),範圍 1–6000;用於生成返回中的 publicUrl; 超過原圖參數無效
modeString否縮放模式:fit-等比縮放,crop-居中裁剪;用於生成 publicUrl,默認 fit
qInteger否輸出質量,範圍 1–100;用於生成 publicUrl
fString否輸出格式:jpg / png / webp;用於生成 publicUrl
bgString否背景填充色(HEX,不含 #);用於生成 publicUrl
keywordSearchTypeString否搜索類型:DEEP(深度搜索 默認),DEFAULT(站內默認搜索),PRECISE(精準搜索) DEEP_AND_PRECISE(深度和精準)

SortConditionVO參數說明:

字段名類型必填描述
sortNameSortConditionFieldEnum是排序字段
sortTypeSortTypeEnum否排序方式

SortConditionFieldEnum枚舉值:

枚舉值描述
CREATE_TIME創建時間
UPDATE_TIME更新時間
NAME名稱
DURATION時長
SIZE大小
SCORE評分

SortTypeEnum枚舉值:

枚舉值描述
ASC正序
DESC倒序

響應參數:

參數名類型描述
assetsList<MiniDamAssetDTO>素材列表
totalLong總數量

MiniDamAssetDTO參數說明:

字段名類型描述
idLong素材ID
parentIdsList<Long>父文件夾ID列表
userIdString用戶ID
nameString文件原始名稱
downloadUrlString下載路徑
sourceInteger素材來源(1:網頁,2:上傳,3:複製)
linkString網頁鏈接
extensionString文件後綴
durationLong視頻時長
sizeLong文件大小(KB)
widthInteger文件寬度
heightInteger文件高度
descriptionString描述
scoreInteger評分
createTimeDate創建時間
createUserString創建人
updateTimeDate更新時間
updateUserLong更新人
tagsList<TagDTO>標籤列表
thumbnailAccessUrlString縮略圖訪問路徑
imageContentAnalysisImageContentAnalysis智能解析內容
publicUrlString原圖公開鏈接(帶 w/h/mode/q/f/bg 處理參數);未傳處理參數或無公開鏈接時為空字符串

TagDTO參數說明:

字段名類型描述
idLong標籤ID
nameString標籤名稱

ImageContentAnalysis參數說明:

字段名類型描述
aiTagsString智能標籤信息
aiTitleString智能標籤名稱
aiDescriptionString智能描述
aiDetailedDescriptionJSONArray智能描述詳情

請求示例:

bash
curl --location --request POST 'https://open.musedam.cc/api/muse/search-assets' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"parentId": 100,
"needChildren": true,
"extensions": [
"jpg",
"png"
],
"minSize": 1024,
"maxSize": 10485760,
"keywords": [
"产品",
"宣传"
],
"tags": [
1,
2
],
"sort": {
"sortName": "CREATE_TIME",
"sortType": "DESC"
},
"startPoint": 0,
"endPoint": 20
}'

響應示例:

json
{
"code": "0",
"message": "OK",
"result": {
"assets": [
{
"id": 10001,
"parentIds": [
100
],
"userId": "user123",
"name": "产品宣传图.jpg",
"downloadUrl": "https://example.com/download/10001",
"source": 2,
"extension": "jpg",
"size": 1024,
"width": 1920,
"height": 1080,
"description": "产品宣传图片",
"score": 5,
"createTime": "2023-04-03T10:00:00",
"createUser": "张三",
"tags": [
{
"id": 1,
"name": "产品"
},
{
"id": 2,
"name": "宣传"
}
],
"thumbnailAccessUrl": "https://example.com/thumbnail/10001",
"imageContentAnalysis": {
"aiTags": "未来主义,流线型设计,现代,黄色,城市街道,黑色,黄昏,智能交通系统,科幻,广告,自动驾驶,汽车,概念艺术",
"aiTitle": "未来感十足的城市跑车",
"aiDescription": "这是一辆设计前卫、充满科技元素的未来城市跑车。车身采用了流线型的设计,并且在侧面有明显的橙色装饰线条点缀其中,在夜晚灯光下显得格外醒目。车辆两侧的大灯呈三角形排列,与整体风格相得益彰;而尾部则有一个独特的扰流板造型突出于后方,增加了运动气息的同时也提升了空气动力学性能。\n\n背景是一个繁华都市夜景场景——高楼大厦林立其间灯火辉煌霓虹闪烁映衬出一幅现代城市的繁忙景象街道上还有其他模糊不清的小汽车穿梭来往增添了几分动感氛围营造出了浓厚科幻色彩",
"aiDetailedDescription": [
{
"usage": "这是一辆未来感十足的概念车,设计用于科幻电影或电子游戏中的场景。"
},
{
"mood": "充满活力和科技感的情绪氛围"
},
{
"culture_traits": "体现了现代都市文化的创新和技术进步特点"
},
{
"industry_domain": "汽车制造与高科技产业相关联"
},
{
"seasonality": ""
},
{
"holiday_theme": ""
},
{
"color_scheme": "主要使用了黑色、黄色以及橙色调作为车辆的主要颜色搭配"
}
]
}
}
],
"total": 150
}}

分享列表搜索

接口路徑:/search-share

請求方式:POST

接口描述:檢索分享鏈接內的素材

請求參數:

參數名類型必填默認值描述
linkTokenString是-分享鏈接的唯一標識token
passwordString否-分享鏈接的提取碼,如果分享設置了提取碼則必填
folderIdLong否-指定查詢的文件夾ID,不傳則默認查詢根目錄
needChildrenBoolean否false是否需要包含子目錄下的素材
isRootBoolean否false是否是分享的根目錄
keywordString否-搜索關鍵詞,用於過濾文件名包含該關鍵詞的素材
startPointInteger否0分頁參數,開始索引位置
endPointInteger否40分頁參數,結束索引位置,每頁默認40條數據

響應參數:

參數名類型描述
assetsList<MiniDamAssetDTO>素材列表
totalCountLong素材總數量
foldersList<FolderDTO>文件夾列表
folderCountLong文件夾總數

FolderDTO參數說明

參數名類型描述
idLong文件夾id
nameString文件夾名稱

請求示例:

bash
curl --location --request POST 'https://open.musedam.cc/api/muse/search-share' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"linkToken":"12534a263031407481ccac298e3568f7",
"isRoot":false,
"folderId":23343,
"needChildren":true
}'

響應示例:

json
{
"code": "0",
"message": "OK",
"result": {
"assets": [
{
"id": 6905957,
"parentIds": [
23046,
23345
],
"userId": "1673603133161799680",
"name": "Wrigley's Doublemint香蕉味口香糖",
"downloadUrl": "https://example.com/assets/sample.jpg",
"source": null,
"link": null,
"extension": "png",
"duration": null,
"size": 209769,
"width": 800,
"height": 800,
"description": null,
"score": null,
"createTime": 1741160880000,
"createUser": "1673603133161799680",
"updateTime": 1741160880000,
"updateUser": 1673603133161799680,
"tags": [],
"thumbnailAccessUrl": "https://example.com/assets/sample.jpg"
}
],
"folders": [
{
"id": 23345,
"name": "访客测试2-1"
}
],
"totalCount": 1,
"folderCount": 1
},
"traceId": "109456b3501142a4a015a0b53fe7bc7e"
}
MuseDAM Developer PlatformAPI · Integrations · MCP
    素材檢索 | MuseDAM Developers