Create a rerank request
Rerank a list of documents by relevance to a query. Returns a relevance score and ordering index for each document.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The model to be used for the rerank request.
See all of Together AI's rerank models
Salesforce/Llama-Rank-v1 "Salesforce/Llama-Rank-V1"
The search query to be used for ranking.
"What animals can I find near Peru?"
List of documents, which can be either strings or objects.
The number of top results to return.
2
Whether to return supplied documents with the response.
true
List of keys in the JSON Object document to rank by. Defaults to use all supplied keys for ranking.
Response
200