curl --request POST \
--url https://open.bigmodel.cn/api/llm-application/open/v2/application/file_upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'app_id=<string>' \
--form files=@example-file
{
"data": {
"success_info": [
{
"file_id": "<string>",
"file_name": "<string>"
}
],
"fail_info": [
{
"file_name": "<string>",
"fail_reason": "<string>"
}
]
},
"code": 123,
"message": "<string>",
"timestamp": 123
}
上传文件到智能体(应用),同步返回上传结果。需通过文件解析状态接口获取解析结果。
curl --request POST \
--url https://open.bigmodel.cn/api/llm-application/open/v2/application/file_upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'app_id=<string>' \
--form files=@example-file
{
"data": {
"success_info": [
{
"file_id": "<string>",
"file_name": "<string>"
}
],
"fail_info": [
{
"file_name": "<string>",
"fail_reason": "<string>"
}
]
},
"code": 123,
"message": "<string>",
"timestamp": 123
}
使用以下格式进行身份验证:Bearer <your api key>
请求成功
The response is of type object
.