Skip to main content
POST
文本重排序接口
Note: For setting the embedding model name, refer to the System Supported Rerank Models List. When switching models, you only need to modify the corresponding model name. The response data format is fully compatible with OpenAI.

cURL Request Example

Authorizations

Authorization
string
header
required

API认证token

Body

application/json
model
string
required

重排模型

Example:

"rerank-multilingual-v3.0"

query
string
required

重排提示

Example:

"美国首都是哪里?"

documents
string[]
required

用于重新排序的字符串数组

Example:
top_n
integer
default:10

返回前N个最匹配结果

Example:

10

retries
integer
default:0

自动重试次数,默认0,表示失败不重试

Example:

0

Response

成功响应

model
string
required

使用的重排模型

Example:

"rerank-multilingual-v3.0"

results
object[]
required

重排序结果列表

usage
object
required
metadata
object

额外的元数据信息