Skip to main content
This operation answers for a rerank model you have deployed in your workspace. Send a query and the candidate documents, and the response scores every candidate against that query and returns them in ranked order. It is the second stage of a retrieval pipeline: a fast first-stage search proposes candidates, this call decides which of them actually answer the query.

Request fields

Candidates keep the order you sent them in. Every result names its candidate by index, the position in the array you supplied, so you can join the scores back onto your own records without matching on text.

Response

The values below are an example, not a measurement.
Scores are comparable within one response, because every candidate was judged against the same query. They are not a probability and they do not carry meaning across two different queries, so pick a cutoff by ranking position or by a threshold you tuned on your own data, never by assuming a fixed scale.

Candidate limits

A single call scores at most 100 candidates. The deployment serving the request also carries its own verified batch limit, and the lower of the two applies. Over either limit the call fails with rerank_document_limit_exceeded, and the message names the limit that was hit. Split a larger candidate set across calls and merge the ranked lists yourself.

Retries

Send an Idempotency-Key and a retried call replays the stored result instead of scoring again, so a lost response never costs a second run. See Idempotent retries for the header rules and the replay headers.

Billing

Reranking bills on the terms of the deployment serving it.

Errors

Failures use the same OpenAI-style error envelope as every other /v1 operation. These codes are specific to this endpoint. A 404 model_not_found means the id in model is not a model this key can reach. Deploy the model in your workspace, then call GET /v1/models to confirm the id before retrying.

Embeddings

Produce the vectors your first-stage search retrieves before this call reorders them.

Models

Discover the model ids your key can reach.

Errors

Handle validation, availability, and rate-limit failures.