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

合規檢測

查詢檢測規則、建立與追加檢測任務,取得任務進度和素材風險明細。

最近更新

接入說明

合規檢測為擴展模塊。團隊需已開通合規檢測功能後,方可使用本組開放接口。推薦流程:查詢規則 → 創建任務開檢 → 輪詢任務概覽至完成 → 拉取素材明細。

  • 基礎地址:https://open.musedam.ai/api/muse
  • 鑒權:請求頭攜帶 Authorization: Bearer your_api_key。
  • 請求格式:以下接口均使用 POST,請求體為 JSON,攜帶 Content-Type: application/json。
  • 表格中的響應描述指業務結果,外層響應格式見快速開始。

合規檢測規則列表

說明: 分頁查詢團隊合規檢測規則。未傳 releaseStatus 時默認只返回已發佈規則(2)。

接口路徑:/detection-rules

請求方式:POST

請求參數:EnterpriseDetectionRuleListReq

字段名類型必填描述
pageInteger否頁碼,默認 1
pageSizeInteger否每頁條數,默認 10
keywordString否規則名稱關鍵字
createTimeSortInteger否創建時間排序:1 倒序,0 正序
releaseStatusInteger否發佈狀態:1 未發佈,2 已發佈;不傳默認 2
idsList<Long>否按規則 id 過濾

響應:EnterpriseDetectionRulePageDTO

字段名類型描述
totalLong總數
rulesList<EnterpriseDetectionRuleDTO>規則列表

rules 單項字段:

字段名類型描述
idLong規則 id
ruleNameString規則名稱
ruleTypeInteger規則類型:1 通用檢測
ruleEventIdsString檢測渠道:sucai / ADLAW / REGIONAL_COMPLIANCE,逗號分隔
regionalGreenServiceCodesString地區合規綠網 serviceCode,逗號分隔
releaseStatusInteger1 未發佈 / 2 已發佈
createTimeDate創建時間
needEnterpriseRuleInteger是否需要企業規則:0 / 1

請求示例:

bash
curl --location --request POST 'https://open.musedam.ai/api/muse/detection-rules' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"page": 1,
"pageSize": 20
}'

創建合規檢測任務

說明: 創建檢測任務並自動開檢。

接口路徑:/detection-task-create

請求方式:POST

請求參數:EnterpriseDetectionTaskCreateReq

字段名類型必填描述
taskNameString否任務名稱
taskDescString否任務描述
ruleIdLong是檢測規則 id(建議使用已發佈規則)
assetIdsList<Long>條件素材 materialId 列表(檢索或上傳返回的素材 ID);可與 groupIds / folderId 組合,最終素材不能為空
groupIdsList<Long>條件組合素材 id 列表
folderIdLong否大於 0 時按該文件夾下全部素材建任務(最多 3000 個素材)

響應:Long(任務 id)

請求示例:

bash
curl --location --request POST 'https://open.musedam.ai/api/muse/detection-task-create' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"taskName": "廣告素材合規抽檢",
"ruleId": 10001,
"assetIds": [20001, 20002]
}'

注意事項:

  • 創建成功後服務端會自動觸發檢測。
  • assetIds 傳 materialId(檢索或上傳返回的素材 ID)。

添加素材到檢測任務

說明: 向已有任務追加素材並續檢。已在任務中的素材不可重復添加。

接口路徑:/detection-task-add-assets

請求方式:POST

請求參數:EnterpriseDetectionTaskAddAssetsReq

字段名類型必填描述
taskIdLong是檢測任務 id
assetIdsList<Long>條件素材 materialId 列表;與 groupIds 至少一個有效
groupIdsList<Long>條件組合素材 id 列表

響應:Long(任務 id)

請求示例:

bash
curl --location --request POST 'https://open.musedam.ai/api/muse/detection-task-add-assets' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"taskId": 30001,
"assetIds": [20003, 20004]
}'

注意事項:

  • 同創建接口:assetIds 傳 materialId。

查詢合規檢測任務概覽

說明: 按任務 id 查詢任務狀態與風險匯總。創建任務後可輪詢本接口直至 taskStatus=4。

接口路徑:/detection-task-get

請求方式:POST

請求參數:EnterpriseDetectionTaskGetReq

字段名類型必填描述
taskIdLong是檢測任務 id

響應:EnterpriseDetectionTaskDTO

字段名類型描述
taskIdLong任務 id
taskNameString任務名稱
taskStatusInteger1 排隊中 / 2 執行中 / 3 暫停 / 4 執行完成
ruleIdLong規則 id
ruleNameString規則名稱
agentIdString品牌合規智能體 id(可空)
agentNameString智能體名稱(可空)
taskSourceInteger0 手動 / 1 自動
createTimeDate創建時間
assetDetectionStatusInteger匯總檢測狀態:0 未檢測 / 1 檢測中 / 2 檢測完成 / 3 檢測失敗
taskAssetIdAllCountInteger任務素材總數
taskAssetIdCheckedCountInteger已檢測素材數
taskAssetIdPassCountInteger通過數
taskAssetIdReviewCountInteger可疑(建議人工審核)數
taskAssetIdRiskCountInteger違規(建議攔截)數

請求示例:

bash
curl --location --request POST 'https://open.musedam.ai/api/muse/detection-task-get' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"taskId": 30001
}'

查詢合規檢測任務明細

說明: 分頁查詢任務內素材檢測明細。可選按開放側 materialId 過濾。

接口路徑:/detection-task-details

請求方式:POST

請求參數:EnterpriseDetectionTaskDetailsReq

字段名類型必填描述
taskIdLong是檢測任務 id
pageInteger否頁碼,默認 1
pageSizeInteger否每頁條數,默認 20
materialIdLong否開放側素材 id;傳入時僅返回該素材明細

響應:EnterpriseDetectionTaskDetailsPageDTO

字段名類型描述
totalLong總數
itemsList<EnterpriseDetectionTaskAssetDetailDTO>明細列表

items 單項字段:

字段名類型描述
materialIdLong開放側素材 id
materialNameString素材名稱
sizeLong文件大小(字節)
widthInteger寬度
heightInteger高度
durationLong視頻時長(毫秒)
extensionString後綴
batchIdString批次 id
bizTypeInteger1 真實素材 / 2 待入庫
detectionDetailsList<EnterpriseDetectionDetailDTO>各渠道檢測結果

detectionDetails 單項字段:

字段名類型描述
eventIdString檢測渠道
assetDetectionStatusInteger0 未檢測 / 1 檢測中 / 2 檢測完成
messageString信息
codeInteger請求 code
riskLevelPassCountInteger通過數
riskLevelReviewCountInteger可疑數
riskLevelRejectCountInteger違規數
finishTimeDate完成時間
assetDetectionAllResultString完整結果原文

請求示例:

bash
curl --location --request POST 'https://open.musedam.ai/api/muse/detection-task-details' \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"taskId": 30001,
"page": 1,
"pageSize": 20,
"materialId": 20001
}'

注意事項:

  • materialId 須為本團隊存在的素材;不存在時返回參數錯誤。
  • 推薦流程:detection-task-create → 輪詢 detection-task-get 至完成 → detection-task-details 拉明細。
MuseDAM Developer PlatformAPI · Integrations · MCP
    合規檢測 | MuseDAM Developers