Skip to main content
POST
/
v1
/
rerank
文本重排序
curl --request POST \
  --url https://api.qclawrouter.com/v1/rerank \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "rerank-v3.5",
  "query": "<string>",
  "documents": [
    "<string>"
  ],
  "top_n": 123
}
'
{
  "results": [
    {
      "index": 123,
      "relevance_score": 123,
      "document": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

使用您的 API Key 作为 Bearer Token。在控制台创建令牌获取。

Body

application/json
model
string
required
Example:

"rerank-v3.5"

query
string
required

查询文本

documents
string[]
required

待排序的文档列表

top_n
integer

返回前 N 个结果

Response

200 - application/json

排序结果

results
object[]