RS Infer
Server Endpoints

/v1/rerank

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)`.

POST
/v1/rerank

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).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/rerank" \  -H "Content-Type: application/json" \  -d '{    "model": "ms-marco",    "query": "capital of France",    "documents": [      "Paris is the capital of France.",      "The sky is blue."    ],    "top_n": 1  }'
{  "id": "string",  "model": "string",  "results": [    {      "index": 0,      "document": {        "text": "string"      },      "relevance_score": 0.1    }  ],  "usage": {    "prompt_tokens": 0,    "total_tokens": 0  }}