On this page
Compatibility
Rerank
POST /v1/rerank against a rerank-capable model, billed on model-reported units.
POST
/v1/rerankAPI keyAliases: /rerank and /api/v1/rerank. The model must support reranking; otherwise the request fails with 400.
Request
curl -X POST https://api.relayrouter.org/v1/rerank \ -H "Authorization: Bearer $RELAY_API_KEY" \ -H 'content-type: application/json' \ -d '{ "model": "your-rerank-model", "query": "what is a relay router?", "documents": [ "a gateway that proxies model calls", "a network switch", "a cooking recipe" ] }'Billing
Billed on the model-reported total tokens, or the returned document count when the provider omits usage. Everything is billed at the input price; there is no completion side.