🚀 GLM-4.6 代码编程专享计划 • 限时优惠 Coding Plan ➞
curl --request POST \
--url https://open.bigmodel.cn/api/llm-application/open/document/upload_url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"upload_detail": [
{
"url": "<string>",
"knowledge_type": 123,
"custom_separator": [
"<string>"
],
"sentence_size": 123,
"callback_url": "<string>",
"callback_header": {}
}
],
"knowledge_id": "<string>"
}
'{
"data": {
"successInfos": [
{
"documentId": "122121212",
"url": "xxx.com"
},
{
"documentId": "12121212121",
"url": "xxx.com"
}
],
"failedInfos": [
{
"url": "xxx.com",
"failReason": "不支持的文档类型"
}
]
},
"code": 200,
"message": "请求成功",
"timestamp": 1689649504996
}上传URL类型的文档或网页作为内容填充知识库。
curl --request POST \
--url https://open.bigmodel.cn/api/llm-application/open/document/upload_url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"upload_detail": [
{
"url": "<string>",
"knowledge_type": 123,
"custom_separator": [
"<string>"
],
"sentence_size": 123,
"callback_url": "<string>",
"callback_header": {}
}
],
"knowledge_id": "<string>"
}
'{
"data": {
"successInfos": [
{
"documentId": "122121212",
"url": "xxx.com"
},
{
"documentId": "12121212121",
"url": "xxx.com"
}
],
"failedInfos": [
{
"url": "xxx.com",
"failReason": "不支持的文档类型"
}
]
},
"code": 200,
"message": "请求成功",
"timestamp": 1689649504996
}url列表
Hide child attributes
url
文档切片类型
自定义切片分隔符,仅 knowledge_type=5 时生效,默认
自定义切片字数,仅 knowledge_type=5 时生效,20-2000,默认300
回调地址
回调header k-v
知识库id
请求成功
状态码
返回信息
时间戳