POST
/
v1
/
rerank
curl --request POST \
  --url https://api.taam.cloud/v1/rerank \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "mixr-v1",
  "query": "What are the health benefits of exercise?",
  "documents": [
    "Exercise improves cardiovascular health and reduces stress.",
    "Proper nutrition is essential for overall well-being.",
    "Sleep quality affects mental and physical performance."
  ],
  "top_n": 2
}'

The Rerank endpoint helps improve search quality by reordering documents based on their relevance to a query.

Authentication Required

Learn how to get your API key to use this endpoint

Models

Available models for reranking:

  • rerank-english-v2.0
  • rerank-english-v3.0
  • rerank-multilingual-v2.0
  • rerank-multilingual-v3.0

Example Request

{
  "model": "jina-reranker-v2-base-multilingual",
  "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",
    "Natural remedies for skin inflammation and redness"
  ]
}

Authorizations

Authorization
string
header
required

Enter your API key prefixed with 'Bearer '

Body

application/json
model
string
required
query
string
required
documents
string[]
required
top_n
integer

Response

200

Successful response