Skip to main content
This endpoint is not yet available. It is planned for a future release.
Cross-encoder reranking significantly outperforms cosine similarity alone. Essential for production search systems over Indic-language documents.

Planned endpoint

POST https://api.forii.in/inference/v1/rerank

Example (planned)

curl https://api.forii.in/inference/v1/rerank \
  -H "Authorization: Bearer $FORII_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "forii/rerank-v3",
    "query": "GST rate for textile exports",
    "documents": [
      "GST on textile exports is 0% with LUT",
      "Textile domestic sales attract 5% GST",
      "Service tax on textile logistics is 18%"
    ],
    "top_n": 3
  }'

Planned response

{
  "object": "list",
  "data": [
    {"index": 1, "relevance_score": 0.94, "document": "Textile domestic sales attract 5% GST"},
    {"index": 0, "relevance_score": 0.89, "document": "GST on textile exports is 0% with LUT"},
    {"index": 2, "relevance_score": 0.31, "document": "Service tax on textile logistics is 18%"}
  ],
  "model": "forii/rerank-v3",
  "usage": {"prompt_tokens": 45, "total_tokens": 45}
}