Skip to main content
POST
从知识库检索分段 / 测试检索

Authorizations

Authorization
string
header
required

API Key 认证。对于所有 API 请求,请在 Authorization HTTP 头中包含您的 API Key,并加上 Bearer 前缀。示例:Authorization: Bearer {API_KEY}强烈建议将 API Key 存储在服务端,不要在客户端共享或存储,以避免 API Key 泄漏导致严重后果。缺少或无效的 API Key 会返回 HTTP 401,错误码为 unauthorized

Path Parameters

dataset_id
string<uuid>
required

知识库 ID。

Body

application/json
query
string
required

搜索查询文本。

Maximum string length: 250
retrieval_model
object

检索模型配置。控制查询此知识库时如何搜索和排序分段。

attachment_ids
string[] | null

要包含在检索上下文中的附件 ID 列表。

Response

检索结果。

query
object

原始查询对象。

records
object[]

匹配的检索记录列表。

Last modified on July 9, 2026