/rerank
Identical to `POST /v1/rerank` (vLLM/Jina/Cohere compatible reranker).
Identical to POST /v1/rerank (vLLM/Jina/Cohere compatible reranker).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/rerank" \ -H "Content-Type: application/json" \ -d '{ "query": "string", "documents": [ "string" ] }'{ "id": "string", "model": "string", "results": [ { "index": 0, "document": { "text": "string" }, "relevance_score": 0.1 } ], "usage": { "prompt_tokens": 0, "total_tokens": 0 }}/v1/rerank POST
Rerank documents against a query (vLLM/Jina/Cohere compatible). Scores every `(query, document)` pair, sorts by descending `relevance_score`, and truncates to `top_n`. Scoring modes are configured per model in the YAML — all modes except `logit` return scores in `(0, 1)`.
/v1/score POST
Score the `text_1 × text_2` cross-product (vLLM /v1/score). Every pair between `text_1` and `text_2` is scored with the reranker. The response `data` array has `|text_1| × |text_2|` items in pair order.
RS Infer