重排序接口(Rerank,兼容 Jina 格式)
简介
重排序接口根据查询对文档列表按相关性排序,并为每个文档给出相关性分数,请求格式与 Jina AI Rerank 相同。可用模型:qwen3-reranker-8b、qwen3-reranker-4b、qwen3-reranker-0.6b,均支持多语言。
基础重排序请求:
curl https://beeroute.ai/v1/rerank \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"model": "qwen3-reranker-8b",
"query": "Organic skincare products for sensitive skin",
"top_n": 3,
"documents": [
"Organic skincare for sensitive skin with aloe vera and chamomile...",
"New makeup trends focus on bold colors and innovative techniques...",
"Bio-Hautpflege für empfindliche Haut mit Aloe Vera und Kamille..."
]
}'
响应示例:
{
"results": [
{
"document": {
"text": "Organic skincare for sensitive skin with aloe vera and chamomile..."
},
"index": 0,
"relevance_score": 0.8783142566680908
},
{
"document": {
"text": "Bio-Hautpflege für empfindliche Haut mit Aloe Vera und Kamille..."
},
"index": 2,
"relevance_score": 0.7624675869941711
}
],
"usage": {
"prompt_tokens": 815,
"completion_tokens": 0,
"total_tokens": 815
}
}
更新于 2026-11-29 · Markdown 原文 · llms.txt