diff --git a/apps/web/src/api/assets/assets.ts b/apps/web/src/api/assets/assets.ts index 902aface1..7899c643f 100644 --- a/apps/web/src/api/assets/assets.ts +++ b/apps/web/src/api/assets/assets.ts @@ -49,6 +49,19 @@ export const getAssetsByKind = async ( return response.data.items || [] } +/** + * 智能匹配素材(后端 AI 选素材) + * 调用后端 smart-match 端点,由后端根据素材库内容智能选择素材 + */ +export const smartMatchAssets = async ( + libraryId: string, +): Promise<{ items: AssetItem[] }> => { + const response = await apiClient.post("/assets/smart-match", { + library_id: libraryId, + }) + return response.data +} + /** 创建素材(上传文件后调用,附带 metadata) */ export const createAsset = async (data: { library_id: string @@ -85,3 +98,4 @@ export const updateAssetReviewStatus = async ( export const deleteAsset = async (assetId: string): Promise => { await apiClient.delete(`/assets/${assetId}`) } +