Skip to main content
Pinecone Docs

Search documentation

Type to search this documentation.

On this pageOverview

Rerank results

For guidance and examples, see Rerank results.

POST /rerank

  • X-Pinecone-Api-Version (header, string, required) — Required date-based version header
  • model (body, string, required) — The model to use for reranking.
  • query (body, string, required) — The query to rerank documents against.
  • top_n (body, integer) — The number of results to return sorted by relevance. Defaults to the number of inputs.
  • return_documents (body, boolean) — Whether to return the documents in the response.
  • rank_fields (body, string[]) — The field(s) to consider for reranking. If not provided, the default is ["text"]. The number of fields supported is model-specific.
  • documents (body, object[], required) — The documents to rerank.
  • parameters (body, object) — Additional model-specific parameters. Refer to the model guide for available model parameters.
  • 200 — OK
  • 400 — Bad request. The request body included invalid request parameters.
  • 401 — Unauthorized. Possible causes: Invalid API key.
  • 500 — Internal server error.
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu