Gateway

Rerank documents

Reranks a list of documents against a query.

post/rerank

Request

  • Base URL: https://api.phaseo.app/v1
  • URL: https://api.phaseo.app/v1/rerank
  • Auth: HTTP bearer

Request body

modelstring required
modelsstring[]

Optional ordered fallback models tried after model. model is required and is always the primary model. When an attempt fails with 429, 500, 502, 503, or 504, the next entry is tried; other errors are returned unchanged. Accepts up to 25 model IDs or presets; duplicates and entries equal to model are ignored. Each attempt is validated, logged, and billed as its own request, and the response model field and routing trace show the model that served the request. Streaming requests fall back only before the first byte, and video and music jobs fall back only at submission. Batch, realtime, and council requests reject models. Fallbacks set on a dynamic route take precedence, and phaseo/auto cannot be combined with models.

querystring required
top_ninteger
top_kinteger

Alias for top_n.

return_documentsboolean
max_chunks_per_docinteger
rank_fieldsstring[]
userstring
metadataobject
provider_optionsobject

Example request

{
  "models": [
    "anthropic/claude-sonnet-5-5",
    "google/gemini-2.5-flash"
  ]
}

Response

Rerank response

objectstring
idstring
nativeResponseIdstring nullable
modelstring

Changes

No recorded changes to this operation across all 1 revision of this API.