curl --location 'https://ai.xihuyun.com/v1/assets' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"type": "object",
"title": "上传本地素材",
"description": "POST /v1/assets · 支持单文件与多文件(同一请求多个 file 字段)。Authorization: Bearer <API_KEY>",
"properties": {
"file": {
"type": "array",
"items": {
"type": "string",
"format": "binary"
},
"description": "素材文件(支持多文件)。扩展名:图片 .jpg/.jpeg/.png/.webp/.gif/.bmp;视频 .mp4/.mov/.webm/.mkv/.avi/.m4v;音频 .mp3/.wav/.m4a/.aac/.flac/.ogg",
"x-apifox-orders": 1
},
"agreed": {
"type": "string",
"enum": ["true"],
"description": "是否同意素材使用合规协议,传 true(必填)",
"x-apifox-orders": 2
},
"folder_id": {
"type": "string",
"description": "素材所属文件夹 ID(选填)",
"x-apifox-orders": 3
},
"storage_mode": {
"type": "string",
"description": "使用平台已配置的存储模式;不填使用默认模式(选填)",
"x-apifox-orders": 4
}
},
"required": ["file", "agreed"],
"x-apifox-folder": "Asset 素材库"
}'