v1

latestOpenAPI 3.1.02026-07-2675394318.9 KB
inference

Rerank documents

Reranks documents based on their relevance to a query.

post/v1/rerank

Query parameters

ai_project_idstring nullable

current project ID

current project ID

Request body

modelstring required

ID of the model to use.

querystring required

Query to rerank, encoded as a string.

documentsstring[] required

Documents to rerank, encoded as a list of strings.

userstring nullable

A unique identifier representing your end-user.

service_tier'auto' | 'default' | 'over-limit' | 'flex' | 'no-limit'

Represents the service tier for requests.

Attributes: Auto: Automatically choose the best available tier for the request (Default or OverLimit). Analyze response to determine which tier was used. Default: Return 429 errors on hitting the rate limit, do not exceed to the OverLimit tier. OverLimit: Indicate that the request was over the user limit. This tier cannot be set by user in the request, but us used in a response for tier=Auto. Flex: Do not consume rate-limit credits, but run with lower priority. May still result in 429 errors in case of if there is no resources to process.

Example request

{
  "model": "Qwen/Qwen3-Reranker-8B",
  "query": "What is the capital of France?",
  "documents": [
    "The capital of Brazil is Brasilia.",
    "The capital of France is Paris.",
    "Amsterdam",
    "Belgrade"
  ]
}

Response

OK

idstring required

A unique identifier for the reranking response.

modelstring required

The model used for the reranking.