POST /rerank

Rerank results according to their relevance to a query.

For guidance and examples, see Rerank results.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

X-Pinecone-Api-Version String Yes

Required date-based version header

Default value: "2025-10"

Request body fields

Name Type Required Description
documents[] Array Yes

The documents to rerank.

query String Yes

The query to rerank documents against.

rank_fields[] Array No

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

The number of fields supported is model-specific.

Default value: [ "text" ]

parameters Object No

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

return_documents Boolean No

Whether to return the documents in the response.

Default value: true

model String Yes

The model to use for reranking.

top_n Integer No

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

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.