Skip to main content
POST
Reranking sits between retrieval and generation: embeddings decide what to fetch, a reranker decides which of those results are worth sending to a chat model. The reranking models are listed at GET /v1/models?type=reranking, with prices.

Request body

string
required
A reranking model id, for example qwen3-reranker-8b. A model of any other type returns 400 pointing to GET /v1/models?type=reranking.
string
required
The text to rank the documents against. Must not be empty.
array
required
A non-empty array of strings to rank.
Other fields in the body are forwarded to the model as sent.

Response

The body is the model’s ranking of your documents, returned as the model produced it with two changes: model is the Kyma id you called, and usage.cost is added. usage.prompt_tokens covers the query and every document. Responses are not streamed.

Billing

Input tokens only, at the model’s input rate: the query plus every document. Sending a hundred documents costs a hundred documents. usage.cost is the price of the call in USD, to 8 decimal places.

Response headers

Errors

The body is {"error": {"message": "...", "type": "..."}}.