POST
/
rerank

Body

application/json
documents
object[]
required

The documents to rerank.

model
string
required

The model to use for reranking.

query
string
required

The query to rerank documents against.

parameters
object

Additional model-specific parameters for the reranker.

rank_fields
string[]

The fields to rank the documents by. If not provided, the default is "text".

return_documents
boolean
default:
true

Whether to return the documents in the response.

top_n
integer

The number of results to return sorted by relevance. Defaults to the number of inputs.

Response

200 - application/json

The result of a reranking request.

data
object[]
required

The reranked documents.

model
string
required

The model used to rerank documents.

usage
object
required

Usage statistics for the model inference.

Was this page helpful?