Skip to main content
POST

Authorizations

Api-Key
string
header
required

An API Key is required to call Pinecone APIs. Get yours from the console.

Headers

X-Pinecone-Api-Version
string
default:2025-10
required

Required date-based version header

Body

application/json

Rerank documents for the given query

model
string
required

The model to use for reranking.

Example:

"bge-reranker-v2-m3"

query
string
required

The query to rerank documents against.

Example:

"What is the capital of France?"

documents
object[]
required

The documents to rerank.

top_n
integer

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

Example:

5

return_documents
boolean
default:true

Whether to return the documents in the response.

Example:

true

rank_fields
string[]

The field(s) to consider for reranking. If not provided, the default is ["text"].

The number of fields supported is model-specific.

parameters
object

Additional model-specific parameters. Refer to the model guide for available model parameters.

Example:

Response

OK

The result of a reranking request.

model
string
required

The model used to rerank documents.

Example:

"bge-reranker-v2-m3"

data
object[]
required

The reranked documents.

usage
object
required

Usage statistics for the model inference.